[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.Password

Class Password

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents a password used to protect a document.

public class Password
Inheritance
object
Password
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Fields

KnownHashes

Gets the list of known hash algorithms.

public static readonly IReadOnlyList<CryptographicAlgorithmSid> KnownHashes

Field Value

System.Collections.Generic.IReadOnlyList<T><CryptographicAlgorithmSid>

Properties

HashType

Gets the hash algorithm used to encrypt the password.

public CryptographicAlgorithmSid HashType { get; }

Property Value

CryptographicAlgorithmSid

SpinCount

Gets the number of times the hashing function shall be iteratively run.

public int SpinCount { get; }

Property Value

int

Methods

ResetPassword()

Resets the current password.

public void ResetPassword()

SetPassword(string, CryptographicAlgorithmSid, int)

Sets the current password. If password is null or empty, password will be reset.

public void SetPassword(string password, CryptographicAlgorithmSid sid = CryptographicAlgorithmSid.SHA_512, int spinCount = 50000)

Parameters

password string

The password string.

sid CryptographicAlgorithmSid

The password hashing algorithm.

spinCount int

The count of hash transformations used in password generation.

ValidatePassword(string)

Compares the current password to a specified value.

public PasswordValidationResult ValidatePassword(string password)

Parameters

password string

The value to compare the current password to.

Returns

PasswordValidationResult

A PasswordValidationResult representing the result of comparison.