Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 182 for blockSize (0.29 sec)

  1. src/crypto/rand/rand_plan9.go

    	var (
    		counter uint64
    		block   [aes.BlockSize]byte
    	)
    	inc := func() {
    		counter++
    		if counter == 0 {
    			panic("crypto/rand counter wrapped")
    		}
    		byteorder.LePutUint64(block[:], counter)
    	}
    	blockCipher.Encrypt(r.key[:aes.BlockSize], block[:])
    	inc()
    	blockCipher.Encrypt(r.key[aes.BlockSize:], block[:])
    	inc()
    	r.mu.Unlock()
    
    	n = len(b)
    	for len(b) >= aes.BlockSize {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. src/crypto/cipher/ofb.go

    // to b's block size.
    func NewOFB(b Block, iv []byte) Stream {
    	blockSize := b.BlockSize()
    	if len(iv) != blockSize {
    		panic("cipher.NewOFB: IV length must equal block size")
    	}
    	bufSize := streamBufferSize
    	if bufSize < blockSize {
    		bufSize = blockSize
    	}
    	x := &ofb{
    		b:       b,
    		cipher:  make([]byte, blockSize),
    		out:     make([]byte, 0, bufSize),
    		outUsed: 0,
    	}
    
    	copy(x.cipher, iv)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  3. cmd/erasure-encode_test.go

    	{dataBlocks: 4, onDisks: 8, offDisks: 2, blocksize: int64(blockSizeV2), data: oneMiByte, offset: 2, algorithm: DefaultBitrotAlgorithm, shouldFail: false, shouldFailQuorum: false},                 // 2
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  4. pkg/util/tail/tail_test.go

    			longerThanMax: true,
    			expected:      "a",
    		},
    		{
    			name:          "the file length is longer than max and contains newlines",
    			max:           blockSize,
    			longerThanMax: true,
    			expected:      strings.Repeat("a", blockSize/2-1) + "\n" + strings.Repeat("a", blockSize/2),
    		},
    		{
    			name:          "the max is longer than file length ",
    			max:           4613,
    			longerThanMax: false,
    			expected:      string(testBytes),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 13:13:22 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. src/crypto/md5/md5.go

    }
    
    // The size of an MD5 checksum in bytes.
    const Size = 16
    
    // The blocksize of MD5 in bytes.
    const BlockSize = 64
    
    const (
    	init0 = 0x67452301
    	init1 = 0xEFCDAB89
    	init2 = 0x98BADCFE
    	init3 = 0x10325476
    )
    
    // digest represents the partial evaluation of a checksum.
    type digest struct {
    	s   [4]uint32
    	x   [BlockSize]byte
    	nx  int
    	len uint64
    }
    
    func (d *digest) Reset() {
    	d.s[0] = init0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. src/crypto/aes/cbc_s390x.go

    	return &c
    }
    
    func (x *cbc) BlockSize() int { return BlockSize }
    
    // cryptBlocksChain invokes the cipher message with chaining (KMC) instruction
    // with the given function code. The length must be a multiple of BlockSize (16).
    //
    //go:noescape
    func cryptBlocksChain(c code, iv, key, dst, src *byte, length int)
    
    func (x *cbc) CryptBlocks(dst, src []byte) {
    	if len(src)%BlockSize != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  7. src/crypto/aes/cipher_asm.go

    	return &c.aesCipherAsm, nil
    }
    
    func (c *aesCipherAsm) BlockSize() int { return BlockSize }
    
    func (c *aesCipherAsm) Encrypt(dst, src []byte) {
    	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")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 14:58:19 UTC 2024
    - 3K bytes
    - Viewed (0)
  8. src/crypto/cipher/ctr.go

    func NewCTR(block Block, iv []byte) Stream {
    	if ctr, ok := block.(ctrAble); ok {
    		return ctr.NewCTR(iv)
    	}
    	if len(iv) != block.BlockSize() {
    		panic("cipher.NewCTR: IV length must equal block size")
    	}
    	bufSize := streamBufferSize
    	if bufSize < block.BlockSize() {
    		bufSize = block.BlockSize()
    	}
    	return &ctr{
    		b:       block,
    		ctr:     bytes.Clone(iv),
    		out:     make([]byte, 0, bufSize),
    		outUsed: 0,
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  9. src/crypto/aes/cbc_ppc64x.go

    	c.enc = cbcDecrypt
    	copy(c.iv[:], iv)
    	return &c
    }
    
    func (x *cbc) BlockSize() int { return BlockSize }
    
    // cryptBlocksChain invokes the cipher message identifying encrypt or decrypt.
    //
    //go:noescape
    func cryptBlocksChain(src, dst *byte, length int, key *uint32, iv *byte, enc int, nr int)
    
    func (x *cbc) CryptBlocks(dst, src []byte) {
    	if len(src)%BlockSize != 0 {
    		panic("crypto/cipher: input not full blocks")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:31 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  10. src/crypto/cipher/cfb.go

    }
    
    func newCFB(block Block, iv []byte, decrypt bool) Stream {
    	blockSize := block.BlockSize()
    	if len(iv) != blockSize {
    		// stack trace will indicate whether it was de or encryption
    		panic("cipher.newCFB: IV length must equal block size")
    	}
    	x := &cfb{
    		b:       block,
    		out:     make([]byte, blockSize),
    		next:    make([]byte, blockSize),
    		outUsed: blockSize,
    		decrypt: decrypt,
    	}
    	copy(x.next, iv)
    
    	return x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top