- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for XORKeyStream (0.31 sec)
-
src/crypto/cipher/io.go
// StreamReader wraps a [Stream] into an [io.Reader]. It calls XORKeyStream // to process each slice of data which passes through. type StreamReader struct { S Stream R io.Reader } func (r StreamReader) Read(dst []byte) (n int, err error) { n, err = r.R.Read(dst) r.S.XORKeyStream(dst[:n], dst[:n]) return } // StreamWriter wraps a [Stream] into an io.Writer. It calls XORKeyStream
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 1.5K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go
//go:build gc && !purego package chacha20 import "golang.org/x/sys/cpu" var haveAsm = cpu.S390X.HasVX const bufSize = 256 // xorKeyStreamVX is an assembly implementation of XORKeyStream. It must only // be called when the vector facility is available. Implementation in asm_s390x.s. // //go:noescape func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 743 bytes - Viewed (0) -
src/crypto/rc4/rc4.go
// the process's memory. func (c *Cipher) Reset() { for i := range c.s { c.s[i] = 0 } c.i, c.j = 0, 0 } // XORKeyStream sets dst to the result of XORing src with the key stream. // Dst and src must overlap entirely or not at all. func (c *Cipher) XORKeyStream(dst, src []byte) { if len(src) == 0 { return } if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/rc4: invalid buffer overlap")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 1.9K bytes - Viewed (0) -
src/crypto/cipher/ofb.go
x.out = x.out[:cap(x.out)] for remain < len(x.out)-bs { x.b.Encrypt(x.cipher, x.cipher) copy(x.out[remain:], x.cipher) remain += bs } x.out = x.out[:remain] x.outUsed = 0 } func (x *ofb) XORKeyStream(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") } if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/cipher: invalid buffer overlap") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 1.6K bytes - Viewed (0) -
src/crypto/cipher/cfb.go
package cipher import ( "crypto/internal/alias" "crypto/subtle" ) type cfb struct { b Block next []byte out []byte outUsed int decrypt bool } func (x *cfb) XORKeyStream(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") } if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/cipher: invalid buffer overlap") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 2K bytes - Viewed (0) -
src/crypto/aes/ctr_s390x.go
c0++ } } c.ctr[0], c.ctr[1] = c0, c1 // Encrypt the buffer using AES in ECB mode. cryptBlocks(c.block.function, &c.block.key[0], &c.buffer[0], &c.buffer[0], streamBufferSize) } func (c *aesctr) XORKeyStream(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") } if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/cipher: invalid buffer overlap") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 2.4K bytes - Viewed (0) -
src/crypto/cipher/ctr.go
// Increment counter for i := len(x.ctr) - 1; i >= 0; i-- { x.ctr[i]++ if x.ctr[i] != 0 { break } } } x.out = x.out[:remain] x.outUsed = 0 } func (x *ctr) XORKeyStream(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") } if alias.InexactOverlap(dst[:len(src)], src) { panic("crypto/cipher: invalid buffer overlap") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 2.2K bytes - Viewed (0)