- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for inexactOverlap (0.2 sec)
-
src/crypto/internal/alias/alias_test.go
} func testAliasing(t *testing.T, i int, x, y []byte, anyOverlap, inexactOverlap bool) { any := AnyOverlap(x, y) if any != anyOverlap { t.Errorf("%d: wrong AnyOverlap result, expected %v, got %v", i, anyOverlap, any) } inexact := InexactOverlap(x, y) if inexact != inexactOverlap { t.Errorf("%d: wrong InexactOverlap result, expected %v, got %v", i, inexactOverlap, any) } } func TestAliasing(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 17 18:46:05 UTC 2022 - 1.3K bytes - Viewed (0) -
src/crypto/internal/alias/alias.go
} // InexactOverlap reports whether x and y share memory at any non-corresponding // index. The memory beyond the slice length is ignored. Note that x and y can // have different lengths and still not have any inexact overlap. // // InexactOverlap can be used to implement the requirements of the crypto/cipher // AEAD, Block, BlockMode and Stream interfaces. func InexactOverlap(x, y []byte) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 20 03:27:26 UTC 2023 - 1.1K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/internal/alias/alias.go
} // InexactOverlap reports whether x and y share memory at any non-corresponding // index. The memory beyond the slice length is ignored. Note that x and y can // have different lengths and still not have any inexact overlap. // // InexactOverlap can be used to implement the requirements of the crypto/cipher // AEAD, Block, BlockMode and Stream interfaces. func InexactOverlap(x, y []byte) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.1K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/internal/alias/alias_purego.go
} // InexactOverlap reports whether x and y share memory at any non-corresponding // index. The memory beyond the slice length is ignored. Note that x and y can // have different lengths and still not have any inexact overlap. // // InexactOverlap can be used to implement the requirements of the crypto/cipher // AEAD, Block, BlockMode and Stream interfaces. func InexactOverlap(x, y []byte) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.2K bytes - Viewed (0) -
src/crypto/internal/boring/aes.go
return nil, aesKeySizeError(len(key)) } return c, nil } func (c *aesCipher) BlockSize() int { return aesBlockSize } func (c *aesCipher) Encrypt(dst, src []byte) { if inexactOverlap(dst, src) { panic("crypto/cipher: invalid buffer overlap") } if len(src) < aesBlockSize { panic("crypto/aes: input not full block") } if len(dst) < aesBlockSize {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 26 22:52:27 UTC 2024 - 10.2K bytes - Viewed (0) -
src/crypto/des/cipher.go
func (c *desCipher) Encrypt(dst, src []byte) { if len(src) < BlockSize { panic("crypto/des: input not full block") } if len(dst) < BlockSize { panic("crypto/des: output not full block") } if alias.InexactOverlap(dst[:BlockSize], src[:BlockSize]) { panic("crypto/des: invalid buffer overlap") } cryptBlock(c.subkeys[:], dst, src, false) } func (c *desCipher) Decrypt(dst, src []byte) { if len(src) < BlockSize {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 4K bytes - Viewed (0) -
src/crypto/aes/cipher.go
func (c *aesCipher) Encrypt(dst, src []byte) { if len(src) < BlockSize { panic("crypto/aes: input not full block") } if len(dst) < BlockSize { panic("crypto/aes: output not full block") } if alias.InexactOverlap(dst[:BlockSize], src[:BlockSize]) { panic("crypto/aes: invalid buffer overlap") } encryptBlockGo(c.enc[:c.l], dst, src) } func (c *aesCipher) Decrypt(dst, src []byte) { if len(src) < BlockSize {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 14:58:19 UTC 2024 - 2K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go
func (c *chacha20poly1305) sealGeneric(dst, nonce, plaintext, additionalData []byte) []byte { ret, out := sliceForAppend(dst, len(plaintext)+poly1305.TagSize) ciphertext, tag := out[:len(plaintext)], out[len(plaintext):] if alias.InexactOverlap(out, plaintext) { panic("chacha20poly1305: invalid buffer overlap") } var polyKey [32]byte s, _ := chacha20.NewUnauthenticatedCipher(c.key[:], nonce) s.XORKeyStream(polyKey[:], polyKey[:])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 00:11:50 UTC 2022 - 2.2K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go
if !cpu.X86.HasSSSE3 { return c.sealGeneric(dst, nonce, plaintext, additionalData) } var state [16]uint32 setupState(&state, &c.key, nonce) ret, out := sliceForAppend(dst, len(plaintext)+16) if alias.InexactOverlap(out, plaintext) { panic("chacha20poly1305: invalid buffer overlap") } chacha20Poly1305Seal(out[:], state[:], plaintext, additionalData) return ret }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 2.4K bytes - Viewed (0) -
src/crypto/aes/cipher_asm.go
boring.Unreachable() if len(src) < BlockSize { panic("crypto/aes: input not full block") } if len(dst) < BlockSize { panic("crypto/aes: output not full block") } if alias.InexactOverlap(dst[:BlockSize], src[:BlockSize]) { panic("crypto/aes: invalid buffer overlap") } encryptBlockAsm(int(c.l)/4-1, &c.enc[0], &dst[0], &src[0]) } func (c *aesCipherAsm) Decrypt(dst, src []byte) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 14:58:19 UTC 2024 - 3K bytes - Viewed (0)