Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModeIdentity Mode = iota ModeUnknown ModeAESCTR ModeAESCFB ModeAESOFB ModeAESRec = ModeAESCTR ModeIdentityName = "identity" ModeAESCTRName = "aes-ctr" ModeAESCFBName = "aes-cfb" ModeAESOFBName = "aes-ofb" ModeAESRecName = "aes-rec" ModeUknownName = "unknown" )
Enumerate available modes and their textual names
Variables ¶
This section is empty.
Functions ¶
func MakeRandomAESKey ¶
MakeRandomAESKey generates AES-256 (32 byte) key securely by using a cryptographic entropy source
func NewEncryptedContainer ¶
NewEncryptedContainer wraps the provided container in transparent encryption and decryption
func ValidAESKey ¶
ValidAESKey confirms the provided key is the correct length for AES/128/224/256 and is not all zeros
Types ¶
type Mode ¶
type Mode uint8
Mode represents an encryption mode
func ModeFromName ¶
ModeFromName constructs a Mode from a textual name
func (Mode) NewWriter ¶
func (m Mode) NewWriter(wtr io.WriteCloser, key []byte) (encryptor io.WriteCloser, initVect []byte, err error)
NewWriter constructs a writer wrapper that applies this mode's encryption
Click to show internal directories.
Click to hide internal directories.