diff options
| author | Kevin Burke <kev@inburke.com> | 2017-07-14 16:20:27 -0600 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-11-16 00:40:00 +0000 |
| commit | c8691f3ac1bb7c175aa066b78d3c895afe1981f9 (patch) | |
| tree | 075aebdd7064671fc2e26ae61c96c52b06093469 /src/database/sql | |
| parent | c32626a4ce9293979c407c4e6a799d1bec37aa18 (diff) | |
| download | go-c8691f3ac1bb7c175aa066b78d3c895afe1981f9.tar.xz | |
crypto/cipher: use raw bytes for keys in docs
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/48596
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions
