Class AgileEncryptionSettings
- Namespace
- DocWright.Cryptography
- Assembly
- DocWright.Cryptography.dll
How to encrypt a package. Defaults match what Word writes, so a file DocWright encrypts with no settings supplied is indistinguishable in shape from one Word produced.
public sealed class AgileEncryptionSettings
- Inheritance
-
AgileEncryptionSettings
- Inherited Members
Remarks
DocWright writes ECMA-376 agile encryption and nothing else. The legacy schemes it reads are all breakable, and a library that can produce them invites someone to choose one.
Constructors
- AgileEncryptionSettings(string)
Initializes settings for a password.
Properties
- HashAlgorithm
Gets or sets the hash algorithm used for key derivation and integrity. Defaults to Sha512.
- KeyBits
Gets or sets the AES key length in bits: 128, 192 or 256. Defaults to 256.
- Password
Gets the password required to open the document.
- RandomSource
Gets or sets the source of salts, IVs and the secret key, or null for the platform cryptographic RNG. Supply one only in tests.
- SaltSize
Gets or sets the salt length in bytes. Defaults to 16.
- SpinCount
Gets or sets the key-derivation iteration count. Defaults to 100,000, which is what Word writes.
Raising it slows an offline guessing attack and slows every legitimate open by the same factor. Values above MaxKeyDerivationSpinCount produce a file DocWright will refuse to read back under default limits.