Source File
aeadrekey.go
Belonging Package
google.golang.org/grpc/credentials/alts/internal/conn
package conn
import (
)
type KeySizeError int
func ( KeySizeError) () string {
return "alts/conn: invalid key size " + strconv.Itoa(int())
}
func ( *rekeyAEAD) ( []byte) error {
:= [kdfCounterOffset : kdfCounterOffset+kdfCounterLen]
if .gcmAEAD != nil && bytes.Equal(, .kdfCounter) {
return nil
}
copy(.kdfCounter, )
, := aes.NewCipher(hkdfExpand(.kdfKey, .kdfCounter))
if != nil {
return
}
.gcmAEAD, = cipher.NewGCM()
return
}
func (, , []byte) {
:= binary.LittleEndian.Uint64([:sizeUint64])
:= binary.LittleEndian.Uint32([sizeUint64:])
:= binary.LittleEndian.Uint64([:sizeUint64])
:= binary.LittleEndian.Uint32([sizeUint64:])
binary.LittleEndian.PutUint64([:sizeUint64], ^)
binary.LittleEndian.PutUint32([sizeUint64:], ^)
}
![]() |
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. |