- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for LePutUint64 (0.3 sec)
-
src/math/rand/v2/chacha8.go
if c.readLen > 0 { n = copy(p, c.readBuf[len(c.readBuf)-c.readLen:]) c.readLen -= n p = p[n:] } for len(p) >= 8 { byteorder.LePutUint64(p, c.Uint64()) p = p[8:] n += 8 } if len(p) > 0 { byteorder.LePutUint64(c.readBuf[:], c.Uint64()) n += copy(p, c.readBuf[:]) c.readLen = 8 - len(p) } return } // UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:09:08 UTC 2024 - 2.8K bytes - Viewed (0) -
src/crypto/rand/rand_plan9.go
return 0, err } 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) -
src/internal/byteorder/byteorder.go
return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 } func LePutUint64(b []byte, v uint64) { _ = b[7] // early bounds check to guarantee safety of writes below b[0] = byte(v) b[1] = byte(v >> 8) b[2] = byte(v >> 16) b[3] = byte(v >> 24) b[4] = byte(v >> 32) b[5] = byte(v >> 40)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 20:31:29 UTC 2024 - 3.5K bytes - Viewed (0) -
src/crypto/md5/md5.go
// // 1 byte end marker :: 0-63 padding bytes :: 8 byte length tmp := [1 + 63 + 8]byte{0x80} pad := (55 - d.len) % 64 // calculate number of padding bytes byteorder.LePutUint64(tmp[1+pad:], d.len<<3) // append length in bits d.Write(tmp[:1+pad+8]) // The previous write ensures that a whole number of // blocks (i.e. a multiple of 64 bytes) have been hashed. if d.nx != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 4.3K bytes - Viewed (0) -
src/syscall/dir_plan9.go
byteorder.LePutUint32(b, v) return b[4:] } // pbit64 copies the 64-bit number v to b in little-endian order and returns the remaining slice of b. func pbit64(b []byte, v uint64) []byte { byteorder.LePutUint64(b, v) return b[8:] } // pstring copies the string s to b, prepending it with a 16-bit length in little-endian order, and // returning the remaining slice of b.. func pstring(b []byte, s string) []byte {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:32:38 UTC 2024 - 5.2K bytes - Viewed (0) -
src/internal/chacha8rand/chacha8.go
func Marshal(s *State) []byte { data := make([]byte, 6*8) copy(data, "chacha8:") used := (s.c/ctrInc)*chunk + s.i byteorder.BePutUint64(data[1*8:], uint64(used)) for i, seed := range s.seed { byteorder.LePutUint64(data[(2+i)*8:], seed) } return data } type errUnmarshalChaCha8 struct{} func (*errUnmarshalChaCha8) Error() string { return "invalid ChaCha8 encoding" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:47:29 UTC 2024 - 4.4K bytes - Viewed (0) -
src/crypto/tls/bogo_shim_test.go
if err != nil { log.Fatalf("dial err: %s", err) } defer conn.Close() // Write the shim ID we were passed as a little endian uint64 shimIDBytes := make([]byte, 8) byteorder.LePutUint64(shimIDBytes, *shimID) if _, err := conn.Write(shimIDBytes); err != nil { log.Fatalf("failed to write shim id: %s", err) } var tlsConn *Conn if *server { tlsConn = Server(conn, cfg)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 17:25:39 UTC 2024 - 12.6K bytes - Viewed (0) -
src/crypto/internal/edwards25519/field/fe.go
} func (v *Element) bytes(out *[32]byte) []byte { t := *v t.reduce() var buf [8]byte for i, l := range [5]uint64{t.l0, t.l1, t.l2, t.l3, t.l4} { bitsOffset := i * 51 byteorder.LePutUint64(buf[:], l<<uint(bitsOffset%8)) for i, bb := range buf { off := bitsOffset/8 + i if off >= len(out) { break } out[off] |= bb } } return out[:] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 11.8K bytes - Viewed (0)