Anti-Cheat Toolkit  2023.2.6
Multi-purpose anti-cheat solution for Unity Engine
EncryptionSettings Class Reference

Public Member Functions

 EncryptionSettings (string password)
 
 EncryptionSettings (byte[] password=null)
 

Properties

ObscurationMode ObscurationMode [get]
 
byte[] Password [get]
 

Detailed Description

Different ObscuredFile and ObscuredFilePrefs encryption-related settings.

Constructor & Destructor Documentation

◆ EncryptionSettings() [1/2]

EncryptionSettings ( string  password)
inline

Creates new specified encryption settings instance.

Parameters
passwordPassword string used to encrypt and decrypt data. Changes the way data is stored in the file: plain (as is) if password is not set or empty, otherwise data will be encrypted on write and decrypted on read using this password. Will be converted to byte[] internally.
Returns
Configured instance.

◆ EncryptionSettings() [2/2]

EncryptionSettings ( byte[]  password = null)
inline

Creates new specified encryption settings instance.

Parameters
passwordPassword bytes used to encrypt and decrypt data. Changes the way data is stored in the file: plain (as is) if password is not set or empty, otherwise data will be encrypted on write and decrypted on read using this password.
Returns
Configured instance.

Property Documentation

◆ ObscurationMode

Represents the way data is stored in the file: eiter plain (as is) or encrypted with user-set password, depending on Password value.

◆ Password

byte [] Password
get

Password used to encrypt and decrypt data. Switches ObscurationMode to ObscurationMode.Encrypted when set or to ObscurationMode.Plain when not set.

WARNING: Any existing data encrypted with one password will not be readable with another password.