Crate pwsec

Crate pwsec 

Source
Expand description

Support for password-based encryption.

Two variants are provided currently, Chacha and ChachaB64.

Alternative classes with similar API and based on other encryption algorithms can be added.

Structs§

Chacha
A tool to encrypt and decrypt data with chacha20poly1305, with a key that is derived from the given password using pbkdf2.
ChachaB64
A wrapper around Chacha, which uses base64 to convert the Cipher-struct used by Chacha into the fully String-based CipherB64.
Cipher
The values that need to be provided to the decrypt call, in addition to the password and optionally the auth tag.
CipherB64
The values that need to be provided to the decrypt call, in addition to the password and the auth tag.

Enums§

Error
Errors that can occur during encryption or decryption.