X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=misc%2Fbuilddeps%2Fdp.linux64%2Finclude%2Fd0_blind_id%2Fd0_rijndael.h;fp=misc%2Fbuilddeps%2Fdp.linux64%2Finclude%2Fd0_blind_id%2Fd0_rijndael.h;h=e1c8f71bcaba9bfb3f651dc4cd6cdaf7a791fdd7;hb=25713752e382140fa65b259fde9990712006ba95;hp=0000000000000000000000000000000000000000;hpb=75241b8410df7629ffd3164a4ee1c95b30ba6a5a;p=xonotic%2Fxonotic.git diff --git a/misc/builddeps/dp.linux64/include/d0_blind_id/d0_rijndael.h b/misc/builddeps/dp.linux64/include/d0_blind_id/d0_rijndael.h new file mode 100644 index 00000000..e1c8f71b --- /dev/null +++ b/misc/builddeps/dp.linux64/include/d0_blind_id/d0_rijndael.h @@ -0,0 +1,21 @@ +// from http://www.efgh.com/software/rijndael.htm (public domain) + +#ifndef H__RIJNDAEL +#define H__RIJNDAEL + +#include "d0.h" + +D0_EXPORT int d0_rijndael_setup_encrypt(unsigned long *rk, const unsigned char *key, + int keybits); +D0_EXPORT int d0_rijndael_setup_decrypt(unsigned long *rk, const unsigned char *key, + int keybits); +D0_EXPORT void d0_rijndael_encrypt(const unsigned long *rk, int nrounds, + const unsigned char plaintext[16], unsigned char ciphertext[16]); +D0_EXPORT void d0_rijndael_decrypt(const unsigned long *rk, int nrounds, + const unsigned char ciphertext[16], unsigned char plaintext[16]); + +#define D0_RIJNDAEL_KEYLENGTH(keybits) ((keybits)/8) +#define D0_RIJNDAEL_RKLENGTH(keybits) ((keybits)/8+28) +#define D0_RIJNDAEL_NROUNDS(keybits) ((keybits)/32+6) + +#endif