Documentation ¶
Index ¶
- func CombineShareFiles(inputPaths []string) error
- func CombineShares(rawShares []Share) ([]byte, error)
- func DecryptCiphertext(ct Ciphertext, password []byte) ([]byte, error)
- func EncodeCiphertext(ciphertext Ciphertext) ([]byte, error)
- func EncodePlaintext(plaintext Plaintext) ([]byte, error)
- func EncodeShare(share Share) ([]byte, error)
- func EncodeShares(shares []Share) ([][]byte, error)
- func ReadPassword(message string) (*memguard.Enclave, error)
- func SplitPlaintextFile(inputPath string, count int, threshold int) error
- func WritePlaintext(pt Plaintext, fdir string) error
- func WriteShares(shares []Share, fpath string) error
- type CipherType
- type Ciphertext
- type KDFType
- type Plaintext
- type Share
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineShareFiles ¶ added in v1.0.2
func CombineShares ¶
func DecryptCiphertext ¶
func DecryptCiphertext(ct Ciphertext, password []byte) ([]byte, error)
func EncodeCiphertext ¶
func EncodeCiphertext(ciphertext Ciphertext) ([]byte, error)
func EncodePlaintext ¶
func EncodeShare ¶
func EncodeShares ¶
func SplitPlaintextFile ¶ added in v1.0.2
func WritePlaintext ¶
func WriteShares ¶
Types ¶
type CipherType ¶ added in v1.0.3
type CipherType uint8
const (
CIPHER_CHACHA20_POLY1305 CipherType = iota
)
type Ciphertext ¶
type Ciphertext struct { CipherType CipherType // Cipher type used to encrypt the content KDFType KDFType // Key derivation function type used to produce the key Content []byte // Copy of the content, encrypted using a password-derived key Salt []byte // Salt needed to derive a key from a user-inputted password Nonce []byte // Nonce needed for the AEAD cipher }
func DecodeCiphertext ¶
func DecodeCiphertext(raw []byte) (Ciphertext, error)
func EncryptCiphertext ¶
func EncryptCiphertext(raw []byte, password []byte) (Ciphertext, error)
type Plaintext ¶
type Plaintext struct { Content []byte // Copy of the raw content without any encryption applied Filename string // Original filename associated with the content }
func DecodePlaintext ¶
func ReadPlaintext ¶
Click to show internal directories.
Click to hide internal directories.