2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-23 03:18:59 +00:00
qpdf/libqpdf/qpdf/rijndael.h
Jay Berkenbilt 55e400376a got working aes128 implementation
git-svn-id: svn+q:///qpdf/trunk@809 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-17 15:01:20 +00:00

23 lines
669 B
C

#ifndef H__RIJNDAEL
#define H__RIJNDAEL
#include <qpdf/qpdf-config.h>
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
int rijndaelSetupEncrypt(uint32_t *rk, const unsigned char *key,
int keybits);
int rijndaelSetupDecrypt(uint32_t *rk, const unsigned char *key,
int keybits);
void rijndaelEncrypt(const uint32_t *rk, int nrounds,
const unsigned char plaintext[16], unsigned char ciphertext[16]);
void rijndaelDecrypt(const uint32_t *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