string getFileStreebogSum(alias bits)(string filepath)
if (bits == 256 || bits == 512)
The function computes Streebog hash sum for the file.
immutable(Char)[] atbash(Char)(
immutable(Char)[] message,
immutable(Char)[][] alphabets
)
if (isSomeChar!Char)
Atbash encryption.
Parameters
| message | Text for encryption. |
| alphabets | Array of alphabets to use when flipping. |
Returns
Encrypted message.
immutable(Char)[] atbashEnRu(Char)(immutable(Char)[] message)
if (isSomeChar!Char)
A special case of Atbash encryption — for English and Russian alphabets.
Parameters
| message | Text for encryption. |
Returns
Encrypted message.
immutable(Char)[] caesarCypher(Char)(
immutable(Char)[] message,
immutable(Char)[][] alphabets,
ssize_t shift
)
if (isSomeChar!Char)
Caesar encryption.
Parameters
| message | Text for encryption. |
| alphabets | Array of alphabets for internal shifting. |
| shift | Numerical value of the shift. |
Returns
Encrypted message.
ubyte[] vernamByteCipher(in ubyte[] message, in ubyte[] key)
Vernam encryption.
Parameters
| message | Byte array for encryption. |
| key | Encryption key. Its length must be equal to the length of the message. |
Returns
Encrypted message.
Public imports
Functions
| getFileMD5Sum | atbash |
| getFileSha256Sum | atbashEnRu |
| getFileStreebogSum | caesarCypher |
| getFileStreebog256Sum | vernamByteCipher |
| getFileStreebog512Sum | fnv1a32 |
| modulo512 | fnv1a64 |
| xor512 |
Classes
| Streebog | The Streebog class implements GOST R 34.11-2012 for calculating a hash value. |
The module contains the Streebog cryptographic hash function and several simple cryptographic functions.