Skip to main content

prekey_from_sha1

Function prekey_from_sha1 

Source
pub fn prekey_from_sha1(
    sid: &str,
    pwd_sha1: &[u8; 20],
) -> Result<[u8; 20], DpapiError>
Expand description

Derive the per-user pre-key from a SID and a pre-hashed SHA-1 password.

pwd_sha1 is SHA1(UTF16LE(password)). Returns HMAC-SHA1(pwd_sha1, UTF16LE(sid + "\0")) — impacket deriveKeysFromUser key1 (the SHA-1 variant). This is the value to pass to derive_master_key_from_prekey for a modern (Vista+) profile.