🔌Encryption Drivers

Changing how the encryption works

The encryption driver is one of the supported driver types on Nitrocid KS. These drivers allow you to change how the encryption works, thus earning dynamic encryption improvements.

The console drivers have the following characteristics:

  • Interface: IEncryptionDriver

  • Base class: BaseEncryptionDriver

The encryption drivers have the following functions that you can optionally override below:

IEncryptionDriver.cs
abstract string EmptyHash { get; }
abstract int HashLength { get; }
abstract Regex HashRegex { get; }
abstract string GetEncryptedString(string str);
abstract string GetEncryptedFile(Stream stream);
abstract string GetEncryptedFile(string Path);
abstract bool VerifyHashFromHash(string FileName, string ExpectedHash, string ActualHash);
abstract bool VerifyHashFromHashesFile(string FileName, string HashesFile, string ActualHash);
abstract bool VerifyUncalculatedHashFromHash(string FileName, string ExpectedHash);
abstract bool VerifyUncalculatedHashFromHashesFile(string FileName, string HashesFile);

The EncryptionDriverTools class contains tools to get all the encryption drivers and their names and set a encryption driver as a default. The driver management tools also allow you to do the same thing, though you'll have to specify the driver type.

Last updated