Documentation
¶
Index ¶
- Constants
- func Checksum(hash func() hash.Hash, key, data []byte) []byte
- func FromUUID(data string) []byte
- func ReverseBytes(s []byte) []byte
- func ToUUID(data []byte) uuid.UUID
- func Verify(hash func() hash.Hash, key, data, checksum []byte) bool
- type BlockData
- type HkdfKeyGenerator
- type KeyGenerator
- type KeyInfo
Constants ¶
View Source
const (
BlockSize = aes.BlockSize
)
Variables ¶
This section is empty.
Functions ¶
func FromUUID ¶
FromUUID return bytes from uuid string representation (see RFC 4122) reverse order is performed
Types ¶
type BlockData ¶
BlockData used for aes operations
func HmacBlock ¶
HmacBlock compute hmac from hash and key. hmac is stored and returned into BlockData
func (*BlockData) StoreBytes ¶
StoreBytes write data into current BlockData
func (*BlockData) StoreUInt64 ¶
StoreUInt64 write uint64 value into current BlockData
type HkdfKeyGenerator ¶
type HkdfKeyGenerator struct {
// contains filtered or unexported fields
}
HkdfKeyGenerator for hkdf keys derivation
func (*HkdfKeyGenerator) NextKey ¶
func (p *HkdfKeyGenerator) NextKey() ([]byte, error)
NextKey return next hkdf key with BlockSize length
type KeyGenerator ¶
KeyGenerator for key dérivation
func CreateKeyGenerator ¶
func CreateKeyGenerator(hash func() hash.Hash, keyInfo KeyInfo) KeyGenerator
CreateKeyGenerator factory
Click to show internal directories.
Click to hide internal directories.