c4key_setPasswordSHA1

Function c4key_setPasswordSHA1 

Source
pub unsafe extern "C" fn c4key_setPasswordSHA1(
    encryptionKey: *mut C4EncryptionKey,
    password: C4String,
    alg: C4EncryptionAlgorithm,
) -> bool
Expand description

Stores a password into a C4EncryptionKey, by using the key-derivation algorithm PBKDF2 to securely convert the password into a raw binary key. Uses SHA1 for the hashing function as employed by PBKDF2. @param encryptionKey The raw key will be stored here. @param password The password string. @param alg The encryption algorithm to use. Must not be kC4EncryptionNone. @return True on success, false on failure