diff options
Diffstat (limited to 'libgo/go/crypto/cipher/example_test.go')
-rw-r--r-- | libgo/go/crypto/cipher/example_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libgo/go/crypto/cipher/example_test.go b/libgo/go/crypto/cipher/example_test.go index f6cc386..9abe782 100644 --- a/libgo/go/crypto/cipher/example_test.go +++ b/libgo/go/crypto/cipher/example_test.go @@ -44,9 +44,9 @@ func ExampleNewGCMDecrypter() { // The key argument should be the AES key, either 16 or 32 bytes // to select AES-128 or AES-256. key := []byte("AES256Key-32Characters1234567890") - ciphertext, _ := hex.DecodeString("f90fbef747e7212ad7410d0eee2d965de7e890471695cddd2a5bc0ef5da1d04ad8147b62141ad6e4914aee8c512f64fba9037603d41de0d50b718bd665f019cdcd") + ciphertext, _ := hex.DecodeString("1019aa66cd7c024f9efd0038899dae1973ee69427f5a6579eba292ffe1b5a260") - nonce, _ := hex.DecodeString("bb8ef84243d2ee95a41c6c57") + nonce, _ := hex.DecodeString("37b8e8a308c354048d245f6d") block, err := aes.NewCipher(key) if err != nil { @@ -63,7 +63,8 @@ func ExampleNewGCMDecrypter() { panic(err.Error()) } - fmt.Printf("%s\n", string(plaintext)) + fmt.Printf("%s\n", plaintext) + // Output: exampleplaintext } func ExampleNewCBCDecrypter() { |