# GrapeCity.Documents.Word.Password

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Word_Password" data-uid="GrapeCity.Documents.Word.Password" class="text-break">Password Class
</h1>
  <div class="markdown level0 summary"><p>Represents a password used to protect a document.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">Password</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Word.html">GrapeCity.Documents.Word</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Word.dll</h6>
  <h5 id="GrapeCity_Documents_Word_Password_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class Password</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class Password</code></pre>
  </div>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Word_Password_KnownHashes" data-uid="GrapeCity.Documents.Word.Password.KnownHashes">
          <a class="xref" href="GrapeCity.Documents.Word.Password.KnownHashes.html">KnownHashes</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the list of known hash algorithms.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Word_Password_HashType" data-uid="GrapeCity.Documents.Word.Password.HashType">
          <a class="xref" href="GrapeCity.Documents.Word.Password.HashType.html#GrapeCity_Documents_Word_Password_HashType">HashType</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the hash algorithm used to encrypt the password.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_Password_SpinCount" data-uid="GrapeCity.Documents.Word.Password.SpinCount">
          <a class="xref" href="GrapeCity.Documents.Word.Password.SpinCount.html#GrapeCity_Documents_Word_Password_SpinCount">SpinCount</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of times the hashing function shall be iteratively run.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Word_Password_ResetPassword" data-uid="GrapeCity.Documents.Word.Password.ResetPassword">
          <a class="xref" href="GrapeCity.Documents.Word.Password.ResetPassword.html#GrapeCity_Documents_Word_Password_ResetPassword">ResetPassword()</a>
        </td>
        <td class="markdown level1 summary"><p>Resets the current password.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_Password_SetPassword_System_String_GrapeCity_Documents_Word_CryptographicAlgorithmSid_System_Int32_" data-uid="GrapeCity.Documents.Word.Password.SetPassword(System.String,GrapeCity.Documents.Word.CryptographicAlgorithmSid,System.Int32)">
          <a class="xref" href="GrapeCity.Documents.Word.Password.SetPassword.html#GrapeCity_Documents_Word_Password_SetPassword_System_String_GrapeCity_Documents_Word_CryptographicAlgorithmSid_System_Int32_">SetPassword(string, CryptographicAlgorithmSid, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the current password. If password is null or empty, password will be reset.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_Password_ValidatePassword_System_String_" data-uid="GrapeCity.Documents.Word.Password.ValidatePassword(System.String)">
          <a class="xref" href="GrapeCity.Documents.Word.Password.ValidatePassword.html#GrapeCity_Documents_Word_Password_ValidatePassword_System_String_">ValidatePassword(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Compares the current password to a specified value.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
