CryptoSys PKI
23.0.0
|
Password-based encryption. More...
Public Types | |
enum class | PrfAlg |
PRF algorithm. More... | |
Static Public Member Functions | |
static bvec_t | Kdf2 (int dklen, const std::string password, const bvec_t &salt, int count, PrfAlg prfalg=PrfAlg::Hmac_Sha1) |
Derive a key of any length from a password using the PBKDF2 algorithm from PKCS #5 v2.1. More... | |
static bvec_t | Scrypt (int dklen, const std::string password, const bvec_t &salt, int N, int r, int p) |
Derive a key of any length from a password using the SCRYPT algorithm from RFC7914. More... | |
Password-based encryption.
|
strong |
|
static |
Derive a key of any length from a password using the PBKDF2 algorithm from PKCS #5 v2.1.
dklen | Required length of key in bytes. |
password | Password as a string. |
salt | Salt in byte array (to pass a value in hex use Cnv.FromHex). |
count | Iteration count. |
prfalg | HMAC algorithm to use in PRF (default is HMAC-SHA-1). |
|
static |
Derive a key of any length from a password using the SCRYPT algorithm from RFC7914.
dklen | Required length of key in bytes. |
password | Password as a string. |
salt | Salt in byte array (to pass a value in hex use Cnv.FromHex). |
N | CPU/Memory cost parameter, a number greater than one and a power of 2.. |
r | Block size r. |
p | Parallelization parameter p. |