Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

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  
    3131     * 
    3232     * Returns: The amount of encrypted data processed. 
    3333     */ 
    34     uint update(void[] input_, void[] output_); 
     34    abstract uint update(void[] input_, void[] output_); 
    3535     
    3636    /** Returns: The name of the algorithm of this cipher. */ 
    37     string name(); 
     37    abstract string name(); 
    3838     
    3939    /** Reset cipher to its state immediately subsequent the last init. */ 
    40     void reset(); 
     40    abstract void reset(); 
    4141    
    4242    /** 
    4343     * throw an InvalidArgument exception 
     
    6363abstract class BlockCipher : Cipher 
    6464{ 
    6565    /** Returns: The block size in bytes that this cipher will operate on. */ 
    66     uint blockSize(); 
     66    abstract uint blockSize(); 
    6767} 
    6868 
    6969 
     
    7878     * 
    7979     * Returns: One byte of input XORed with the keystream. 
    8080     */ 
    81     ubyte returnByte(ubyte input); 
     81    abstract ubyte returnByte(ubyte input); 
    8282} 
    8383 
    8484  
     
    8686 abstract class BlockCipherPadding 
    8787 { 
    8888    /** Returns: The name of the padding scheme implemented. */ 
    89     string name(); 
     89    abstract string name(); 
    9090 
    9191    /** 
    9292    * Generate padding to a specific length. 
     
    9696    * 
    9797    * Returns: The padding bytes to be added. 
    9898    */  
    99     ubyte[] pad(uint len); 
     99    abstract ubyte[] pad(uint len); 
    100100 
    101101    /** 
    102102    * Return the number of pad bytes in the block. 
     
    109109    * Throws: dcrypt.crypto.errors.InvalidPaddingError if  
    110110    *         pad length cannot be discerned. 
    111111    */ 
    112     uint unpad(void[] input_); 
     112    abstract uint unpad(void[] input_); 
    113113 } 
    114114 
    115115