Table of Contents

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

password string

The password.

algorithm OfficeHashAlgorithmKind

The hash algorithm.

salt byte[]

The salt bytes.

spinCount int

The iteration count.

limits ResourceLimits

The resource caps, or null for the defaults.

Returns

byte[]

The hash bytes.

Exceptions

ArgumentNullException

An argument is null.

ArgumentOutOfRangeException

spinCount is negative.

ResourceLimitExceededException

The spin count exceeds the cap.