Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for sliceForAppend (0.19 sec)

  1. src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go

    	var buf [8]byte
    	binary.LittleEndian.PutUint64(buf[:], uint64(n))
    	p.Write(buf[:])
    }
    
    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")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 00:11:50 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  2. 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)
  3. src/crypto/aes/gcm_s390x.go

    func (g *gcmAsm) Overhead() int {
    	return g.tagSize
    }
    
    // sliceForAppend takes a slice and a requested number of bytes. It returns a
    // slice with the contents of the given slice followed by that many bytes and a
    // second slice that aliases into it and contains only the extra bytes. If the
    // original slice has sufficient capacity then no allocation is performed.
    func sliceForAppend(in []byte, n int) (head, tail []byte) {
    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/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go

    	return c.open(dst, nonce, ciphertext, additionalData)
    }
    
    // sliceForAppend takes a slice and a requested number of bytes. It returns a
    // slice with the contents of the given slice followed by that many bytes and a
    // second slice that aliases into it and contains only the extra bytes. If the
    // original slice has sufficient capacity then no allocation is performed.
    func sliceForAppend(in []byte, n int) (head, tail []byte) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 09 20:10:44 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  5. src/crypto/aes/aes_gcm.go

    func (g *gcmAsm) Overhead() int {
    	return g.tagSize
    }
    
    // sliceForAppend takes a slice and a requested number of bytes. It returns a
    // slice with the contents of the given slice followed by that many bytes and a
    // second slice that aliases into it and contains only the extra bytes. If the
    // original slice has sufficient capacity then no allocation is performed.
    func sliceForAppend(in []byte, n int) (head, tail []byte) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  6. src/crypto/aes/gcm_ppc64x.go

    	gcmInit(&g.productTable, hle)
    
    	return g, nil
    }
    
    func (g *gcmAsm) NonceSize() int {
    	return g.nonceSize
    }
    
    func (g *gcmAsm) Overhead() int {
    	return g.tagSize
    }
    
    func sliceForAppend(in []byte, n int) (head, tail []byte) {
    	if total := len(in) + n; cap(in) >= total {
    		head = in[:total]
    	} else {
    		head = make([]byte, total)
    		copy(head, in)
    	}
    	tail = head[len(in):]
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  7. src/crypto/internal/mlkem768/mlkem768.go

    		}
    		b = b[3:]
    	}
    	return f, nil
    }
    
    // sliceForAppend takes a slice and a requested number of bytes. It returns a
    // slice with the contents of the given slice followed by that many bytes and a
    // second slice that aliases into it and contains only the extra bytes. If the
    // original slice has sufficient capacity then no allocation is performed.
    func sliceForAppend(in []byte, n int) (head, tail []byte) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 28.4K bytes
    - Viewed (0)
  8. src/crypto/cipher/gcm.go

    	byteorder.BePutUint32(ctr, byteorder.BeUint32(ctr)+1)
    }
    
    // sliceForAppend takes a slice and a requested number of bytes. It returns a
    // slice with the contents of the given slice followed by that many bytes and a
    // second slice that aliases into it and contains only the extra bytes. If the
    // original slice has sufficient capacity then no allocation is performed.
    func sliceForAppend(in []byte, n int) (head, tail []byte) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  9. src/crypto/tls/conn.go

    		}
    
    		plaintext = payload[:n]
    	}
    
    	hc.incSeq()
    	return plaintext, typ, nil
    }
    
    // sliceForAppend extends the input slice by n bytes. head is the full extended
    // slice, while tail is the appended part. If the original slice has sufficient
    // capacity no allocation is performed.
    func sliceForAppend(in []byte, n int) (head, tail []byte) {
    	if total := len(in) + n; cap(in) >= total {
    		head = in[:total]
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 51.8K bytes
    - Viewed (0)
Back to top