amalthea.crypto

Undocumented in source.

Public Imports

amalthea.libcore
public import amalthea.libcore;
Undocumented in source.

Members

Classes

Streebog
class Streebog

The Streebog class implements GOST R 34.11-2012 for calculating a hash value.

Functions

atbash
immutable(Char)[] atbash(immutable(Char)[] message, immutable(Char)[][] alphabets)

Atbash encryption.

atbashEnRu
immutable(Char)[] atbashEnRu(immutable(Char)[] message)

A special case of Atbash encryption — for English and Russian alphabets.

caesarCypher
immutable(Char)[] caesarCypher(immutable(Char)[] message, immutable(Char)[][] alphabets, ssize_t shift)

Caesar encryption.

getFileMD5Sum
string getFileMD5Sum(string filepath)

The function computes MD5 digest for the file (with the dmd compiler it works extremely inefficiently).

getFileStreebog256Sum
string getFileStreebog256Sum(string filepath)

256-bit version of file Streebog hash sum.

getFileStreebog512Sum
string getFileStreebog512Sum(string filepath)

512-bit version of file Streebog hash sum.

getFileStreebogSum
string getFileStreebogSum(string filepath)

The function computes Streebog hash sum for the file.

modulo512
ubyte[64] modulo512(ubyte[64] a, ubyte[64] b)

Auxiliary function of the remainder of the division for the Streebog algorithm.

vernamByteCipher
ubyte[] vernamByteCipher(ubyte[] message, ubyte[] key)

Vernam encryption.

vernamCipher
inout(T)[] vernamCipher(inout(T)[] message, inout(T)[] key)
Undocumented in source. Be warned that the author may not have intended to support it.
xor512
ubyte[64] xor512(ubyte[64] a, ubyte[64] b)

Auxiliary XOR-function for the Streebog algorithm.

Static variables

enAlphabetL
dchar[] enAlphabetL;
Undocumented in source.
enAlphabetU
dchar[] enAlphabetU;
Undocumented in source.
ruAlphabetL
dchar[] ruAlphabetL;
Undocumented in source.
ruAlphabetU
dchar[] ruAlphabetU;
Undocumented in source.

Meta