go/src/crypto
Richard Musiol c468ad0417 syscall/js: replace TypedArrayOf with CopyBytesToGo/CopyBytesToJS
The typed arrays returned by TypedArrayOf were backed by WebAssembly
memory. They became invalid each time we grow the WebAssembly memory.
This made them very error prone and hard to use correctly.

This change removes TypedArrayOf completely and instead introduces
CopyBytesToGo and CopyBytesToJS for copying bytes between a byte
slice and an Uint8Array. This breaking change is still allowed for
the syscall/js package.

Fixes #31980.
Fixes #31812.

Change-Id: I14c76fdd60b48dd517c1593972a56d04965cb272
Reviewed-on: https://go-review.googlesource.com/c/go/+/177537
Run-TryBot: Richard Musiol <neelance@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-24 09:38:37 +00:00
..
aes crypto/aes: replace broken extenal link to FIPS 197 2019-02-04 18:22:49 +00:00
cipher syscall/js: replace TypedArrayOf with CopyBytesToGo/CopyBytesToJS 2019-05-24 09:38:37 +00:00
des cmd/go: further reduce init work 2019-03-31 10:49:55 +00:00
dsa
ecdsa crypto/ecdsa: implement ecdsa on s390x for P256/P384/P521 using KDSA instruction 2019-05-24 08:16:32 +00:00
ed25519 crypto/ed25519: promote from golang.org/x/crypto/ed25519 2019-05-06 23:23:45 +00:00
elliptic all: shorten some tests 2019-05-22 12:54:00 +00:00
hmac crypto/hmac: rename CheckHMAC to ValidHMAC in package docs 2018-11-17 21:29:23 +00:00
internal
md5 all: simplify code using "gofmt -s -w" 2019-05-06 22:19:22 +00:00
rand syscall/js: replace TypedArrayOf with CopyBytesToGo/CopyBytesToJS 2019-05-24 09:38:37 +00:00
rc4 crypto/rc4: remove false guarantees from Reset docs and deprecate it 2019-02-22 17:05:17 +00:00
rsa all: remove PEM-encoded private keys from tests 2019-05-21 20:03:55 +00:00
sha1 crypto/sha*: replace putUint{32,64} helpers 2019-05-23 16:16:26 +00:00
sha256 crypto/sha*: replace putUint{32,64} helpers 2019-05-23 16:16:26 +00:00
sha512 crypto/sha*: replace putUint{32,64} helpers 2019-05-23 16:16:26 +00:00
subtle crypto/subtle: normalize constant time ops docs 2019-01-22 19:40:30 +00:00
tls all: shorten some tests 2019-05-22 12:54:00 +00:00
x509 crypto/x509: include roots with empty or multiple policies on macOS 2019-05-22 16:23:17 +00:00
crypto.go
issue21104_test.go