golang.org/x/crypto/ssh.chacha20Poly1305Cipher.buf (field)
27 uses
golang.org/x/crypto/ssh (current package)
cipher.go#L646: buf []byte
cipher.go#L655: buf: make([]byte, 256),
cipher.go#L674: encryptedLength := c.buf[:4]
cipher.go#L693: if uint32(cap(c.buf)) < packetEnd {
cipher.go#L694: c.buf = make([]byte, packetEnd)
cipher.go#L695: copy(c.buf[:], encryptedLength)
cipher.go#L697: c.buf = c.buf[:packetEnd]
cipher.go#L700: if _, err := io.ReadFull(r, c.buf[4:packetEnd]); err != nil {
cipher.go#L705: copy(mac[:], c.buf[contentEnd:packetEnd])
cipher.go#L706: if !poly1305.Verify(&mac, c.buf[:contentEnd], &polyKey) {
cipher.go#L710: plain := c.buf[4:contentEnd]
cipher.go#L751: if cap(c.buf) < totalLength {
cipher.go#L752: c.buf = make([]byte, totalLength)
cipher.go#L754: c.buf = c.buf[:totalLength]
cipher.go#L757: binary.BigEndian.PutUint32(c.buf, uint32(1+len(payload)+padding))
cipher.go#L762: ls.XORKeyStream(c.buf, c.buf[:4])
cipher.go#L763: c.buf[4] = byte(padding)
cipher.go#L764: copy(c.buf[5:], payload)
cipher.go#L766: if _, err := io.ReadFull(rand, c.buf[5+len(payload):packetEnd]); err != nil {
cipher.go#L770: s.XORKeyStream(c.buf[4:], c.buf[4:packetEnd])
cipher.go#L773: poly1305.Sum(&mac, c.buf[:packetEnd], &polyKey)
cipher.go#L775: copy(c.buf[packetEnd:], mac[:])
cipher.go#L777: if _, err := w.Write(c.buf); err != nil {
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |