Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for blockSize (0.24 sec)

  1. src/crypto/des/cipher.go

    	c.generateSubkeys(key)
    	return c, nil
    }
    
    func (c *desCipher) BlockSize() int { return BlockSize }
    
    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")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. internal/config/cache/cache.go

    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	return c.Enable && c.BlockSize > 0 && size <= c.BlockSize
    }
    
    // Update updates new cache frequency
    func (c *Config) Update(ncfg Config) {
    	configLock.Lock()
    	defer configLock.Unlock()
    
    	c.Enable = ncfg.Enable
    	c.Endpoint = ncfg.Endpoint
    	c.BlockSize = ncfg.BlockSize
    	c.clnt = ncfg.clnt
    }
    
    // cache related errors
    var (
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. 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)
  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. 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)
  7. 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)
  8. src/hash/fnv/fnv.go

    func (s *sum128) Size() int  { return 16 }
    func (s *sum128a) Size() int { return 16 }
    
    func (s *sum32) BlockSize() int   { return 1 }
    func (s *sum32a) BlockSize() int  { return 1 }
    func (s *sum64) BlockSize() int   { return 1 }
    func (s *sum64a) BlockSize() int  { return 1 }
    func (s *sum128) BlockSize() int  { return 1 }
    func (s *sum128a) BlockSize() int { return 1 }
    
    func (s *sum32) Sum(in []byte) []byte {
    	v := uint32(*s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 22:36:41 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  9. src/crypto/aes/ctr_s390x.go

    }
    
    // NewCTR returns a Stream which encrypts/decrypts using the AES block
    // cipher in counter mode. The length of iv must be the same as [BlockSize].
    func (c *aesCipherAsm) NewCTR(iv []byte) cipher.Stream {
    	if len(iv) != BlockSize {
    		panic("cipher.NewCTR: IV length must equal block size")
    	}
    	var ac aesctr
    	ac.block = c
    	ac.ctr[0] = byteorder.BeUint64(iv[0:]) // high bits
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  10. pkg/util/tail/tail.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package tail
    
    import (
    	"io"
    	"os"
    )
    
    const (
    	// blockSize is the block size used in tail.
    	blockSize = 1024
    )
    
    // ReadAtMost reads at most max bytes from the end of the file identified by path or
    // returns an error. It returns true if the file was longer than max. It will
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 13:13:22 UTC 2024
    - 1.3K bytes
    - Viewed (0)
Back to top