• Kevin Burke's avatar
    crypto/cipher: use raw bytes for keys in docs · c8691f3a
    Kevin Burke authored
    Using ASCII values for keys is a bad idea since it makes them vastly
    easier to guess. Instead, use the same method as the examples in the
    golang.org/x/crypto/nacl package to load keys from a hex value.
    
    Changing the key required updating the ciphertext in many of the
    examples.
    
    I am still worried about the fact the examples ask the user to
    authenticate messages; authentication isn't trivial, and to be honest
    it may be better to steer people to a higher level primitive like
    secretbox, unless people really need AES.
    
    Fixes #21012.
    
    Change-Id: I8d918cf194694cd380b06c2d561178167ca61adb
    Reviewed-on: https://go-review.googlesource.com/48596Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    c8691f3a
Name
Last commit
Last update
..
benchmark_test.go Loading commit data...
cbc.go Loading commit data...
cbc_aes_test.go Loading commit data...
cfb.go Loading commit data...
cfb_test.go Loading commit data...
cipher.go Loading commit data...
cipher_test.go Loading commit data...
common_test.go Loading commit data...
ctr.go Loading commit data...
ctr_aes_test.go Loading commit data...
ctr_test.go Loading commit data...
example_test.go Loading commit data...
gcm.go Loading commit data...
gcm_test.go Loading commit data...
io.go Loading commit data...
ofb.go Loading commit data...
ofb_test.go Loading commit data...
xor.go Loading commit data...
xor_test.go Loading commit data...