Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDecryptor ¶
func NewDecryptor(alg string, privateKey, ephemeralPub *[x25519KeySize]byte, salt []byte) (*miscreant.StreamDecryptor, error)
NewDecryptor returns a miscreant.StreamDecryptor encryptor instance with the given cipher, nonce, and a key which must be twice as long as an AES key, either 32 or 64 bytes to select AES-128 (AES-SIV-256) or AES-256 (AES-SIV-512).
func NewEncryptor ¶
func NewEncryptor( alg string, publicKey *[x25519KeySize]byte, salt []byte, ) (*miscreant.StreamEncryptor, *[x25519KeySize]byte, error)
NewEncryptor uses X25519 and HKDF to derive a symmetric encryption key and returns a miscreant.StreamEncryptor instance initialized with that key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.