Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for inexactOverlap (0.42 sec)

  1. src/crypto/aes/cipher_s390x.go

    func (c *aesCipherAsm) 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")
    	}
    	cryptBlocks(c.function, &c.key[0], &dst[0], &src[0], BlockSize)
    }
    
    func (c *aesCipherAsm) Decrypt(dst, src []byte) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  2. src/crypto/cipher/ctr.go

    			}
    		}
    	}
    	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")
    	}
    	for len(src) > 0 {
    		if x.outUsed >= len(x.out)-x.b.BlockSize() {
    			x.refill()
    		}
    		n := subtle.XORBytes(dst, src, x.out[x.outUsed:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. src/crypto/aes/gcm_s390x.go

    	}
    	if uint64(len(plaintext)) > ((1<<32)-2)*BlockSize {
    		panic("crypto/cipher: message too large for GCM")
    	}
    
    	ret, out := sliceForAppend(dst, len(plaintext)+g.tagSize)
    	if alias.InexactOverlap(out[:len(plaintext)], plaintext) {
    		panic("crypto/cipher: invalid buffer overlap")
    	}
    
    	counter := g.deriveCounter(nonce)
    
    	var tagMask [gcmBlockSize]byte
    	g.block.Encrypt(tagMask[:], counter[:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  4. src/crypto/aes/aes_gcm.go

    	encryptBlockAsm(len(g.ks)/4-1, &g.ks[0], &tagMask[0], &counter[0])
    
    	var tagOut [gcmTagSize]byte
    	gcmAesData(&g.productTable, data, &tagOut)
    
    	ret, out := sliceForAppend(dst, len(plaintext)+g.tagSize)
    	if alias.InexactOverlap(out[:len(plaintext)], plaintext) {
    		panic("crypto/cipher: invalid buffer overlap")
    	}
    	if len(plaintext) > 0 {
    		gcmAesEnc(&g.productTable, out, plaintext, &counter, &tagOut, g.ks)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  5. src/crypto/aes/cbc_s390x.go

    func (x *cbc) CryptBlocks(dst, src []byte) {
    	if len(src)%BlockSize != 0 {
    		panic("crypto/cipher: input not full blocks")
    	}
    	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")
    	}
    	if len(src) > 0 {
    		cryptBlocksChain(x.c, &x.iv[0], &x.b.key[0], &dst[0], &src[0], len(src))
    	}
    }
    
    func (x *cbc) SetIV(iv []byte) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  6. src/crypto/cipher/cfb.go

    	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")
    	}
    	for len(src) > 0 {
    		if x.outUsed == len(x.out) {
    			x.b.Encrypt(x.out, x.next)
    			x.outUsed = 0
    		}
    
    		if x.decrypt {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 2K bytes
    - Viewed (0)
  7. src/crypto/cipher/ofb.go

    		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")
    	}
    	for len(src) > 0 {
    		if x.outUsed >= len(x.out)-x.b.BlockSize() {
    			x.refill()
    		}
    		n := subtle.XORBytes(dst, src, x.out[x.outUsed:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  8. src/crypto/rc4/rc4.go

    // 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")
    	}
    	i, j := c.i, c.j
    	_ = dst[len(src)-1]
    	dst = dst[:len(src)] // eliminate bounds check from loop
    	for k, v := range src {
    		i += 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  9. src/crypto/cipher/cbc.go

    	if len(src)%x.blockSize != 0 {
    		panic("crypto/cipher: input not full blocks")
    	}
    	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")
    	}
    
    	iv := x.iv
    
    	for len(src) > 0 {
    		// Write the xor to dst, then encrypt in place.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 28 03:55:33 UTC 2022
    - 5.4K bytes
    - Viewed (0)
  10. src/crypto/aes/cbc_ppc64x.go

    func (x *cbc) CryptBlocks(dst, src []byte) {
    	if len(src)%BlockSize != 0 {
    		panic("crypto/cipher: input not full blocks")
    	}
    	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")
    	}
    	if len(src) > 0 {
    		if x.enc == cbcEncrypt {
    			cryptBlocksChain(&src[0], &dst[0], len(src), &x.b.enc[0], &x.iv[0], x.enc, int(x.b.l)/4-1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:31 UTC 2024
    - 1.7K bytes
    - Viewed (0)
Back to top