Versions in this module Expand all Collapse all v1 v1.0.0 Sep 16, 2022 Changes in this version + const DefaultKeySize + const IVSize + const KeyVersionSize + func CreateKey(keySize int) ([]byte, error) + func CreateKeyBase64String(keySize int) (string, error) + func CreateKeyString(keySize int) (string, error) + func Decrypt(key, cipherText []byte) ([]byte, error) + func Encrypt(key, plainText []byte) ([]byte, error) + func HMAC256(key, plainText []byte) []byte + func HMAC512(key, plainText []byte) []byte + func ParseKey(key string) ([]byte, error) + type StreamDecrypter struct + Block cipher.Block + Mac hash.Hash + Meta StreamMeta + Source io.Reader + Stream cipher.Stream + func NewStreamDecrypter(encKey, macKey []byte, meta StreamMeta, cipherText io.Reader) (*StreamDecrypter, error) + func (s *StreamDecrypter) Authenticate() error + func (s *StreamDecrypter) Read(p []byte) (int, error) + type StreamEncrypter struct + Block cipher.Block + IV []byte + Mac hash.Hash + Source io.Reader + Stream cipher.Stream + func NewStreamEncrypter(encKey, macKey []byte, plainText io.Reader) (*StreamEncrypter, error) + func (s *StreamEncrypter) Meta() StreamMeta + func (s *StreamEncrypter) Read(p []byte) (int, error) + type StreamMeta struct + Hash []byte + IV []byte