Documentation
¶
Index ¶
- Variables
- func DeriveKey(password string) []byte
- func FromTrix(data []byte, password string) (*datanode.DataNode, error)
- func FromTrixChaCha(data []byte, password string) (*datanode.DataNode, error)
- func ToTrix(dn *datanode.DataNode, password string) ([]byte, error)
- func ToTrixChaCha(dn *datanode.DataNode, password string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPasswordRequired = errors.New("password is required for encryption") ErrDecryptionFailed = errors.New("decryption failed (wrong password?)") )
Functions ¶
func DeriveKey ¶ added in v0.0.2
DeriveKey derives a 32-byte key from a password using SHA-256. This is used for ChaCha20-Poly1305 encryption which requires a 32-byte key.
func FromTrixChaCha ¶ added in v0.0.2
FromTrixChaCha decrypts a ChaCha-encrypted Trix byte slice back to a DataNode.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.