Class EncryptionSettings
Different ObscuredFile and ObscuredFilePrefs encryption-related settings.
public class EncryptionSettings
- Inheritance
-
objectEncryptionSettings
Constructors
EncryptionSettings(byte[])
Creates new specified encryption settings instance.
public EncryptionSettings(byte[] password = null)
Parameters
passwordbyte[]Password bytes used to encrypt and decrypt data. Changes the way data is stored in the file: plain (as is) if
passwordis not set or empty, otherwise data will be encrypted on write and decrypted on read using thispassword.
EncryptionSettings(string)
Creates new specified encryption settings instance.
public EncryptionSettings(string password)
Parameters
passwordstringPassword string used to encrypt and decrypt data. Changes the way data is stored in the file: plain (as is) if
passwordis not set or empty, otherwise data will be encrypted on write and decrypted on read using thispassword. Will be converted to byte[] internally.
Properties
ObscurationMode
Represents the way data is stored in the file: eiter plain (as is) or encrypted with user-set password, depending on Password value.
public ObscurationMode ObscurationMode { get; }
Property Value
Password
Password used to encrypt and decrypt data. Switches ObscurationMode to ObscurationMode.Encrypted when set or to ObscurationMode.Plain when not set.
public byte[] Password { get; }
Property Value
- byte[]
Remarks
⚠️ Warning: Any existing data encrypted with one password will not be readable with another password.