mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-23 23:28:35 +00:00
26 lines
716 B
C
26 lines
716 B
C
#ifndef RIJNDAEL_H
|
|
#define RIJNDAEL_H
|
|
|
|
#include <qpdf/qpdf-config.h>
|
|
#ifdef HAVE_INTTYPES_H
|
|
# include <inttypes.h>
|
|
#endif
|
|
#ifdef HAVE_STDINT_H
|
|
# include <stdint.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
|