Versions in this module Expand all Collapse all v0 v0.6.0 Jan 2, 2024 v0.5.0 Jan 1, 2024 Changes in this version + const CipherTextMinLength + const PrivateKeyLength + const PublicKeyLength + func Hash(data []byte, length uint32) []byte + type PrivateKey struct + func NewPrivateKey() (*PrivateKey, error) + func NewPrivateKeyForPassword(password []byte) (*PrivateKey, error) + func NewPrivateKeyForPasswordAndSpec(password []byte, iterations, memory, threads uint8) (*PrivateKey, error) + func ParsePrivateKey(key []byte) (*PrivateKey, error) + func (privateKey *PrivateKey) Bytes() ([]byte, error) + func (privateKey *PrivateKey) Decrypt(ciphertext []byte) (data []byte, err error) + func (privateKey *PrivateKey) DecryptStream(dst io.Writer, src io.Reader) (err error) + func (privateKey *PrivateKey) Encrypt(data []byte, compression bool) (ciphertext []byte, err error) + func (privateKey *PrivateKey) EncryptStream(dst io.Writer, src io.Reader, compression bool) (err error) + func (privateKey *PrivateKey) NewDecryptingReader(src io.Reader) (io.ReadCloser, error) + func (privateKey *PrivateKey) NewEncryptingWriter(dst io.Writer, compression bool) (writer io.WriteCloser, err error) + func (privateKey *PrivateKey) PublicKey() (*PublicKey, error) + type PublicKey struct + func ParsePublicKey(pubKeyBytes []byte) (*PublicKey, error) + func (publicKey *PublicKey) Bytes() []byte + func (publicKey *PublicKey) Encrypt(data []byte, compression bool) (ciphertext []byte, err error) + func (publicKey *PublicKey) EncryptStream(dst io.Writer, src io.Reader, compression bool) (err error) + func (publicKey *PublicKey) NewEncryptingWriter(dst io.Writer, compression bool) (writer io.WriteCloser, err error)