summaryrefslogtreecommitdiffstats
path: root/llgo/third_party/gofrontend/libgo/go/crypto/cipher/cipher.go
diff options
context:
space:
mode:
Diffstat (limited to 'llgo/third_party/gofrontend/libgo/go/crypto/cipher/cipher.go')
-rw-r--r--llgo/third_party/gofrontend/libgo/go/crypto/cipher/cipher.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/llgo/third_party/gofrontend/libgo/go/crypto/cipher/cipher.go b/llgo/third_party/gofrontend/libgo/go/crypto/cipher/cipher.go
index 67afdb1e057..7d27fde61d8 100644
--- a/llgo/third_party/gofrontend/libgo/go/crypto/cipher/cipher.go
+++ b/llgo/third_party/gofrontend/libgo/go/crypto/cipher/cipher.go
@@ -29,6 +29,9 @@ type Block interface {
type Stream interface {
// XORKeyStream XORs each byte in the given slice with a byte from the
// cipher's key stream. Dst and src may point to the same memory.
+ // If len(dst) < len(src), XORKeyStream should panic. It is acceptable
+ // to pass a dst bigger than src, and in that case, XORKeyStream will
+ // only update dst[:len(src)] and will not touch the rest of dst.
XORKeyStream(dst, src []byte)
}
OpenPOWER on IntegriCloud