Ticket #857: Cipher.patch
| File Cipher.patch, 1.7 kB (added by Wazar, 2 years ago) |
|---|
-
/root/buff/trunk/tango/util/cipher/Cipher.d
old new 31 31 * 32 32 * Returns: The amount of encrypted data processed. 33 33 */ 34 uint update(void[] input_, void[] output_);34 abstract uint update(void[] input_, void[] output_); 35 35 36 36 /** Returns: The name of the algorithm of this cipher. */ 37 string name();37 abstract string name(); 38 38 39 39 /** Reset cipher to its state immediately subsequent the last init. */ 40 void reset();40 abstract void reset(); 41 41 42 42 /** 43 43 * throw an InvalidArgument exception … … 63 63 abstract class BlockCipher : Cipher 64 64 { 65 65 /** Returns: The block size in bytes that this cipher will operate on. */ 66 uint blockSize();66 abstract uint blockSize(); 67 67 } 68 68 69 69 … … 78 78 * 79 79 * Returns: One byte of input XORed with the keystream. 80 80 */ 81 ubyte returnByte(ubyte input);81 abstract ubyte returnByte(ubyte input); 82 82 } 83 83 84 84 … … 86 86 abstract class BlockCipherPadding 87 87 { 88 88 /** Returns: The name of the padding scheme implemented. */ 89 string name();89 abstract string name(); 90 90 91 91 /** 92 92 * Generate padding to a specific length. … … 96 96 * 97 97 * Returns: The padding bytes to be added. 98 98 */ 99 ubyte[] pad(uint len);99 abstract ubyte[] pad(uint len); 100 100 101 101 /** 102 102 * Return the number of pad bytes in the block. … … 109 109 * Throws: dcrypt.crypto.errors.InvalidPaddingError if 110 110 * pad length cannot be discerned. 111 111 */ 112 uint unpad(void[] input_);112 abstract uint unpad(void[] input_); 113 113 } 114 114 115 115










