Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 157 for blockSize (0.22 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go

    	blockSize := aes.BlockSize
    	paddingSize := blockSize - (len(data) % blockSize)
    	result := make([]byte, blockSize+len(data)+paddingSize)
    	iv := result[:blockSize]
    	if _, err := io.ReadFull(rand.Reader, iv); err != nil {
    		return nil, errors.New("unable to read sufficient random bytes")
    	}
    	copy(result[blockSize:], data)
    
    	// add PKCS#7 padding for CBC
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 21 19:25:52 UTC 2023
    - 9.6K bytes
    - Viewed (0)
  2. src/crypto/internal/boring/hmac.go

    	hkey := bytes.Clone(key)
    	hmac := &boringHMAC{
    		md:        md,
    		size:      ch.Size(),
    		blockSize: ch.BlockSize(),
    		key:       hkey,
    	}
    	hmac.Reset()
    	return hmac
    }
    
    type boringHMAC struct {
    	md          *C.GO_EVP_MD
    	ctx         C.GO_HMAC_CTX
    	ctx2        C.GO_HMAC_CTX
    	size        int
    	blockSize   int
    	key         []byte
    	sum         []byte
    	needCleanup bool
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 17:51:31 UTC 2023
    - 4K bytes
    - Viewed (0)
  3. src/vendor/golang.org/x/crypto/chacha20/chacha_generic.go

    		numBlocks := (len(src) + blockSize - 1) / blockSize
    		buf := s.buf[bufSize-numBlocks*blockSize:]
    		copy(buf, src)
    		s.xorKeyStreamBlocksGeneric(buf, buf)
    		s.len = len(buf) - copy(dst, buf)
    		return
    	}
    
    	// If we have a partial (multi-)block, pad it for xorKeyStreamBlocks, and
    	// keep the leftover keystream for the next XORKeyStream invocation.
    	if len(src) > 0 {
    		s.buf = [bufSize]byte{}
    		copy(s.buf[:], src)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 00:11:50 UTC 2022
    - 13.9K bytes
    - Viewed (0)
  4. src/crypto/cipher/cipher.go

    // using a given key. It provides the capability to encrypt
    // or decrypt individual blocks. The mode implementations
    // extend that capability to streams of blocks.
    type Block interface {
    	// BlockSize returns the cipher's block size.
    	BlockSize() int
    
    	// Encrypt encrypts the first block in src into dst.
    	// Dst and src must overlap entirely or not at all.
    	Encrypt(dst, src []byte)
    
    	// Decrypt decrypts the first block in src into dst.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 28 03:55:33 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  5. src/archive/tar/writer_test.go

    					testReadFrom{fileOps{
    						int64(1e10 - blockSize),
    						strings.Repeat("\x00", blockSize-100) + strings.Repeat("0123456789", 10),
    						int64(1e10 - blockSize),
    						strings.Repeat("\x00", blockSize-100) + strings.Repeat("0123456789", 10),
    						int64(1e10 - blockSize),
    						strings.Repeat("\x00", blockSize-100) + strings.Repeat("0123456789", 10),
    						int64(1e10 - blockSize),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 38.7K bytes
    - Viewed (0)
  6. src/crypto/hmac/hmac.go

    			unique = false
    		}
    	}()
    	if !unique {
    		panic("crypto/hmac: hash generation function does not produce unique values")
    	}
    	blocksize := hm.inner.BlockSize()
    	hm.ipad = make([]byte, blocksize)
    	hm.opad = make([]byte, blocksize)
    	if len(key) > blocksize {
    		// If key is too big, hash it.
    		hm.outer.Write(key)
    		key = hm.outer.Sum(nil)
    	}
    	copy(hm.ipad, key)
    	copy(hm.opad, key)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  7. cmd/erasure-decode.go

    			blockLength = e.blockSize - blockOffset
    		case block == endBlock:
    			blockOffset = 0
    			blockLength = (offset + length) % e.blockSize
    		default:
    			blockOffset = 0
    			blockLength = e.blockSize
    		}
    		if blockLength == 0 {
    			break
    		}
    
    		var err error
    		bufs, err = reader.Read(bufs)
    		if len(bufs) > 0 {
    			// Set only if there are be enough data for reconstruction.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 21 14:36:21 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  8. src/runtime/pprof/protomem.go

    		values[2], values[3] = scaleHeapSample(r.InUseObjects(), r.InUseBytes(), rate)
    		var blockSize int64
    		if r.AllocObjects > 0 {
    			blockSize = r.AllocBytes / r.AllocObjects
    		}
    		b.pbSample(values, locs, func() {
    			if blockSize != 0 {
    				b.pbLabel(tagSample_Label, "bytes", "", blockSize)
    			}
    		})
    	}
    	b.build()
    	return nil
    }
    
    // scaleHeapSample adjusts the data from a heap Sample to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 14:38:45 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  9. src/image/jpeg/writer_test.go

    // column and first row.
    var zigzag = [blockSize]int{
    	0, 1, 5, 6, 14, 15, 27, 28,
    	2, 4, 7, 13, 16, 26, 29, 42,
    	3, 8, 12, 17, 25, 30, 41, 43,
    	9, 11, 18, 24, 31, 40, 44, 53,
    	10, 19, 23, 32, 39, 45, 52, 54,
    	20, 22, 33, 38, 46, 51, 55, 60,
    	21, 34, 37, 47, 50, 56, 59, 61,
    	35, 36, 48, 49, 57, 58, 62, 63,
    }
    
    func TestZigUnzig(t *testing.T) {
    	for i := 0; i < blockSize; i++ {
    		if unzig[zigzag[i]] != i {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:30 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  10. internal/disk/directio_darwin.go

    	fd := f.Fd()
    	_, err := unix.FcntlInt(fd, unix.F_NOCACHE, 0)
    	return err
    }
    
    // AlignedBlock - pass through to directio implementation.
    func AlignedBlock(blockSize int) []byte {
    	return directio.AlignedBlock(blockSize)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Jun 17 14:31:36 UTC 2023
    - 1.4K bytes
    - Viewed (0)
Back to top