string getFileMD5Sum(string filepath)
The function computes MD5 digest for the file (with the dmd compiler it works extremely inefficiently).
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.