Method ComputeOffice2007
- Namespace
- DocWright.Cryptography
- Assembly
- DocWright.Cryptography.dll
ComputeOffice2007(string, OfficeHashAlgorithmKind, byte[], int, ResourceLimits?)
Computes the hash Word records for a password in the Office 2007 spelling (w:hash): the iteration
of Compute(string, OfficeHashAlgorithmKind, byte[], int, ResourceLimits?), over the password's legacy key written as eight hexadecimal digits in place
of the password itself (Phase 157, WQ-0130). Only a password's first fifteen characters count.
public static byte[] ComputeOffice2007(string password, OfficeHashAlgorithmKind algorithm, byte[] salt, int spinCount, ResourceLimits? limits = null)
Parameters
passwordstringThe password.
algorithmOfficeHashAlgorithmKindThe hash algorithm.
saltbyte[]The salt bytes.
spinCountintThe iteration count.
limitsResourceLimitsThe resource caps, or null for the defaults.
Returns
- byte[]
The hash bytes.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentOutOfRangeException
spinCountis negative.- ResourceLimitExceededException
The spin count exceeds the cap.