- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 113 for StdEncoding (0.87 sec)
-
src/encoding/base64/example_test.go
} func ExampleEncoding_EncodeToString() { data := []byte("any + old & data") str := base64.StdEncoding.EncodeToString(data) fmt.Println(str) // Output: // YW55ICsgb2xkICYgZGF0YQ== } func ExampleEncoding_Encode() { data := []byte("Hello, world!") dst := make([]byte, base64.StdEncoding.EncodedLen(len(data))) base64.StdEncoding.Encode(dst, data) fmt.Println(string(dst)) // Output: // SGVsbG8sIHdvcmxkIQ== }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 19 08:44:22 UTC 2021 - 1.9K bytes - Viewed (0) -
src/encoding/base64/base64_test.go
{RawStdEncoding, 0, 0}, {RawStdEncoding, 1, 2}, {RawStdEncoding, 2, 3}, {RawStdEncoding, 3, 4}, {RawStdEncoding, 7, 10}, {StdEncoding, 0, 0}, {StdEncoding, 1, 4}, {StdEncoding, 2, 4}, {StdEncoding, 3, 4}, {StdEncoding, 4, 8}, {StdEncoding, 7, 12}, } // check overflow switch strconv.IntSize { case 32: tests = append(tests, test{RawStdEncoding, (math.MaxInt-5)/8 + 1, 357913942})
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Sep 03 18:57:29 UTC 2023 - 15.9K bytes - Viewed (0) -
src/encoding/base32/base32_test.go
var rawStdEncoding = StdEncoding.WithPadding(NoPadding) type test struct { enc *Encoding n int want int64 } tests := []test{ {StdEncoding, 0, 0}, {StdEncoding, 1, 8}, {StdEncoding, 2, 8}, {StdEncoding, 3, 8}, {StdEncoding, 4, 8}, {StdEncoding, 5, 8}, {StdEncoding, 6, 16}, {StdEncoding, 10, 16}, {StdEncoding, 11, 24}, {rawStdEncoding, 0, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 16:25:54 UTC 2024 - 26K bytes - Viewed (0) -
src/encoding/base32/example_test.go
func ExampleEncoding_EncodeToString() { data := []byte("any + old & data") str := base32.StdEncoding.EncodeToString(data) fmt.Println(str) // Output: // MFXHSIBLEBXWYZBAEYQGIYLUME====== } func ExampleEncoding_Encode() { data := []byte("Hello, world!") dst := make([]byte, base32.StdEncoding.EncodedLen(len(data))) base32.StdEncoding.Encode(dst, data) fmt.Println(string(dst)) // Output: // JBSWY3DPFQQHO33SNRSCC=== }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 27 16:54:36 UTC 2021 - 1.6K bytes - Viewed (0) -
internal/crypto/metadata_test.go
MetaIV: base64.StdEncoding.EncodeToString(append([]byte{1}, make([]byte, 31)...)), MetaAlgorithm: SealAlgorithm, MetaSealedKeyS3: base64.StdEncoding.EncodeToString(append([]byte{1}, make([]byte, 63)...)), MetaKeyID: "key-1", MetaDataEncryptionKey: base64.StdEncoding.EncodeToString(make([]byte, 48)), }, DataKey: make([]byte, 48), KeyID: "key-1", SealedKey: SealedKey{Algorithm: SealAlgorithm, Key: [64]byte{1}, IV: [32]byte{1}},
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Feb 02 00:13:57 UTC 2024 - 18.7K bytes - Viewed (0) -
internal/crypto/sse-kms.go
} metadata[MetaAlgorithm] = sealedKey.Algorithm metadata[MetaIV] = base64.StdEncoding.EncodeToString(sealedKey.IV[:]) metadata[MetaSealedKeyKMS] = base64.StdEncoding.EncodeToString(sealedKey.Key[:]) if len(ctx) > 0 { b, _ := ctx.MarshalText() metadata[MetaContext] = base64.StdEncoding.EncodeToString(b) } if len(kmsKey) > 0 && keyID != "" { // We use a KMS -> Store key ID and sealed KMS data key.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 8.5K bytes - Viewed (0) -
internal/crypto/sse-c.go
return key, ErrMissingCustomerKeyMD5 } clientKey, err := base64.StdEncoding.DecodeString(h.Get(xhttp.AmzServerSideEncryptionCustomerKey)) if err != nil || len(clientKey) != 32 { // The client key must be 256 bits long return key, ErrInvalidCustomerKey } keyMD5, err := base64.StdEncoding.DecodeString(h.Get(xhttp.AmzServerSideEncryptionCustomerKeyMD5))
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 5.2K bytes - Viewed (0) -
docs/debugging/inspect/utils.go
// Try PEM if block, _ := pem.Decode(priv); block != nil { return x509.ParsePKCS1PrivateKey(block.Bytes) } // Try base 64 dst := make([]byte, base64.StdEncoding.DecodedLen(len(priv))) if n, err := base64.StdEncoding.Decode(dst, priv); err == nil { return x509.ParsePKCS1PrivateKey(dst[:n]) } // Try Raw, return error return x509.ParsePKCS1PrivateKey(priv) } func fatalErr(err error) {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Nov 02 20:36:38 UTC 2022 - 1.4K bytes - Viewed (0) -
src/internal/obscuretestdata/obscuretestdata.go
if err != nil { return "", err } defer f.Close() tmp, err := os.CreateTemp("", "obscuretestdata-decoded-") if err != nil { return "", err } if _, err := io.Copy(tmp, base64.NewDecoder(base64.StdEncoding, f)); err != nil { tmp.Close() os.Remove(tmp.Name()) return "", err } if err := tmp.Close(); err != nil { os.Remove(tmp.Name()) return "", err } return tmp.Name(), nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 09 14:47:58 UTC 2022 - 1.6K bytes - Viewed (0) -
internal/crypto/sse-s3.go
metadata[MetaAlgorithm] = sealedKey.Algorithm metadata[MetaIV] = base64.StdEncoding.EncodeToString(sealedKey.IV[:]) metadata[MetaSealedKeyS3] = base64.StdEncoding.EncodeToString(sealedKey.Key[:]) if len(kmsKey) > 0 && keyID != "" { // We use a KMS -> Store key ID and sealed KMS data key. metadata[MetaKeyID] = keyID metadata[MetaDataEncryptionKey] = base64.StdEncoding.EncodeToString(kmsKey) } return metadata }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 7.6K bytes - Viewed (0)