Thomas Dixon
- class Cipher [abstract] ¶
-
Base symmetric cipher class
- uint update(const(void[]) input_, void[] output_) [abstract] ¶
-
Process a block of plaintext data from the input array
and place it in the output array.
input_ | Array containing input data. |
output_ | Array to hold the output data. |
The amount of encrypted data processed.
- const(char)[] name() [@property, abstract] ¶
-
The name of the algorithm of this cipher.
- void reset() [abstract] ¶
-
Reset cipher to its state immediately subsequent the last init.
- void invalid(const(char[]) msg) [static] ¶
-
throw an InvalidArgument exception
msg | message to associate with the exception |
- bool initialized() [final, const] ¶
-
Whether or not the cipher has been initialized.
- class BlockCipher : Cipher [abstract] ¶
-
Interface for a standard block cipher.
- uint blockSize() [@property, const, abstract] ¶
-
The block size in bytes that this cipher will operate on.
- class StreamCipher : Cipher [abstract] ¶
-
Interface for a standard stream cipher.
- ubyte returnByte(ubyte input) [abstract] ¶
-
Process one byte of input.
input | Byte to XOR with keystream. |
One byte of input XORed with the keystream.
- class BlockCipherPadding [abstract] ¶
-
Base padding class for implementing block padding schemes.
- const(char)[] name() [@property, abstract] ¶
-
The name of the padding scheme implemented.
- ubyte[] pad(uint len) [abstract] ¶
-
Generate padding to a specific length.
len | Length of padding to generate |
The padding bytes to be added.
- uint unpad(const(void[]) input_) [abstract] ¶
-
Return the number of pad bytes in the block.
input_ | Padded block of which to count the pad bytes. |
The number of pad bytes in the block.
dcrypt.crypto.errors.InvalidPaddingError if
pad length cannot be discerned.
- struct ByteConverter ¶
-
Converts between integral types and unsigned byte arrays
- struct LittleEndian ¶
-
Conversions between little endian integrals and bytes
- T to(T)(const(void[]) x_) [static] ¶
-
Converts the supplied array to integral type T
x_ | The supplied array of bytes (ubytes, bytes, chars, whatever) |
A integral of type T created with the supplied bytes placed
in the specified byte order.
- void from(T)(T input, ubyte[] output) [static] ¶
-
Converts the supplied integral to an array of unsigned bytes.
input | Integral to convert to bytes |
Integral input of type T split into its respective bytes
with the bytes placed in the specified byte order.
- struct BigEndian ¶
-
Conversions between big endian integrals and bytes