Function argon2_sys::argon2i_hash_encoded[][src]

pub unsafe extern "C" fn argon2i_hash_encoded(
    t_cost: u32,
    m_cost: u32,
    parallelism: u32,
    pwd: *const c_void,
    pwdlen: size_t,
    salt: *const c_void,
    saltlen: size_t,
    hashlen: size_t,
    encoded: *mut c_char,
    encodedlen: size_t
) -> c_int
Expand description

Hashes a password with Argon2i, producing an encoded hash

@param t_cost Number of iterations

@param m_cost Sets memory usage to m_cost kibibytes

@param parallelism Number of threads and compute lanes

@param pwd Pointer to password

@param pwdlen Password size in bytes

@param salt Pointer to salt

@param saltlen Salt size in bytes

@param hashlen Desired length of the hash in bytes

@param encoded Buffer where to write the encoded hash

@param encodedlen Size of the buffer (thus max size of the encoded hash)

@pre Different parallelism levels will give different results

@pre Returns ARGON2_OK if successful