2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-03 19:00:51 +00:00

original rijndael as downloaded from http://www.efgh.com/software/rijndael.htm

git-svn-id: svn+q:///qpdf/trunk@808 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-10-17 14:53:02 +00:00
parent 846c9f6bcc
commit 2c3b6a5c9b
2 changed files with 1223 additions and 0 deletions

17
libqpdf/qpdf/rijndael.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef H__RIJNDAEL
#define H__RIJNDAEL
int rijndaelSetupEncrypt(unsigned long *rk, const unsigned char *key,
int keybits);
int rijndaelSetupDecrypt(unsigned long *rk, const unsigned char *key,
int keybits);
void rijndaelEncrypt(const unsigned long *rk, int nrounds,
const unsigned char plaintext[16], unsigned char ciphertext[16]);
void rijndaelDecrypt(const unsigned long *rk, int nrounds,
const unsigned char ciphertext[16], unsigned char plaintext[16]);
#define KEYLENGTH(keybits) ((keybits)/8)
#define RKLENGTH(keybits) ((keybits)/8+28)
#define NROUNDS(keybits) ((keybits)/32+6)
#endif

1206
libqpdf/rijndael.cc Normal file

File diff suppressed because it is too large Load Diff