Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomSecret ¶
Types ¶
type EtmCryptor ¶
type EtmCryptor struct {
// contains filtered or unexported fields
}
func (*EtmCryptor) Encrypt ¶
Encrypts an cleartext input Reader in 1 megabyte chunks.
File Format:
Header: 10 bytes for version and cipher identification.
"distsync01": v1, AEAD_AES_128_CBC_HMAC_SHA_256. "distsync02": v2, AEAD_CHACHA20_POLY1305
Data block(s):
4-bytes chunk size. (PutUint32) AEAD encrypted data. (up to `v1maxChunkSize`)
Trailing hash block:
0 byte data block, followed by: mac []byte: 32 byte HMAC of file's contents.
Click to show internal directories.
Click to hide internal directories.