1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:30:06 -07:00
go/src/crypto/cipher
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
..
benchmark_test.go crypto/cipher: 8K benchmarks for AES stream modes 2018-09-25 23:11:34 +00:00
cbc_aes_test.go
cbc.go crypto: panic on illegal input and output overlap 2018-06-19 21:06:50 +00:00
cfb_test.go crypto/cipher: fix duplicated arguments to bytes.Equal in test 2019-03-08 22:18:36 +00:00
cfb.go crypto: panic on illegal input and output overlap 2018-06-19 21:06:50 +00:00
cipher_test.go
cipher.go
common_test.go
ctr_aes_test.go
ctr_test.go
ctr.go crypto: panic on illegal input and output overlap 2018-06-19 21:06:50 +00:00
example_test.go crypto/cipher: make stream examples runnable in the playground 2018-10-30 16:23:44 +00:00
export_test.go crypto/cipher: use SIMD for xor on amd64 2018-10-30 17:09:42 +00:00
gcm_test.go crypto/aes: implement AES-GCM AEAD for arm64 2018-07-20 03:30:04 +00:00
gcm.go crypto/{aes,cipher,rand}: use binary.{Big,Little}Endian methods 2018-08-21 16:15:16 +00:00
io.go
ofb_test.go
ofb.go crypto: panic on illegal input and output overlap 2018-06-19 21:06:50 +00:00
xor_amd64.go crypto/cipher: use SIMD for xor on amd64 2018-10-30 17:09:42 +00:00
xor_amd64.s crypto/cipher: use SIMD for xor on amd64 2018-10-30 17:09:42 +00:00
xor_generic.go crypto/cipher: add VSX implementation of xorBytes for ppc64x 2018-11-01 15:56:48 +00:00
xor_ppc64x.go crypto/cipher: add VSX implementation of xorBytes for ppc64x 2018-11-01 15:56:48 +00:00
xor_ppc64x.s crypto/cipher: add VSX implementation of xorBytes for ppc64x 2018-11-01 15:56:48 +00:00
xor_test.go syscall/js: replace TypedArrayOf with CopyBytesToGo/CopyBytesToJS 2019-05-24 09:38:37 +00:00