Changeset 0e66585 for tools/traceanon
- Timestamp:
- 04/02/08 16:39:06 (14 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- d8ed7e2
- Parents:
- 87d7ab9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/traceanon/rijndael.h
r853603a r0e66585 97 97 typedef enum KeyLength_e KeyLength; 98 98 typedef enum State_e State; 99 100 99 /* 101 100 // Creates a Rijndael cipher object … … 126 125 // keyLen : Rijndael::Key16Bytes , Rijndael::Key24Bytes or Rijndael::Key32Bytes 127 126 // initVector: initialization vector, you will usually use 0 here 128 127 */ 129 128 int rijndael_init(Mode mode, Direction dir, const UINT8 *key, KeyLength keyLen, UINT8 * initVector); 130 129 130 /* 131 131 // Encrypts the input array (can be binary data) 132 132 // The input array length must be a multiple of 16 bytes, the remaining part … … 136 136 // outBuffer must be at least inputLen / 8 bytes long. 137 137 // Returns the encrypted buffer length in BITS or an error code < 0 in case of error 138 */ 138 139 int blockEncrypt(const UINT8 *input, int inputLen, UINT8 *outBuffer); 139 // Encrypts the input array (can be binary data) 140 141 /* 142 // Encrypts the input array (can be binary data) 140 143 // The input array can be any length , it is automatically padded on a 16 byte boundary. 141 144 // Input len is in BYTES! 142 145 // outBuffer must be at least (inputLen + 16) bytes long 143 146 // Returns the encrypted buffer length in BYTES or an error code < 0 in case of error 147 */ 144 148 int padEncrypt(const UINT8 *input, int inputOctets, UINT8 *outBuffer); 145 // Decrypts the input vector 149 150 /* 151 // Decrypts the input vector 146 152 // Input len is in BITS! 147 153 // outBuffer must be at least inputLen / 8 bytes long 148 154 // Returns the decrypted buffer length in BITS and an error code < 0 in case of error 155 */ 149 156 int blockDecrypt(const UINT8 *input, int inputLen, UINT8 *outBuffer); 157 158 /* 150 159 // Decrypts the input vector 151 160 // Input len is in BYTES! 152 161 // outBuffer must be at least inputLen bytes long 153 162 // Returns the decrypted buffer length in BYTES and an error code < 0 in case of error 163 */ 154 164 int padDecrypt(const UINT8 *input, int inputOctets, UINT8 *outBuffer); 155 //protected: 165 /*protected:*/ 166 /* 156 167 void keySched(UINT8 key[_MAX_KEY_COLUMNS][4]); 157 168 void keyEncToDec(); 158 169 void r_encrypt(const UINT8 a[16], UINT8 b[16]); 159 170 void r_decrypt(const UINT8 a[16], UINT8 b[16]); 160 //};161 171 */ 172 /*};*/ 162 173 163 174 #endif /* _RIJNDAEL_H_ */
Note: See TracChangeset
for help on using the changeset viewer.