Advertisement
Guest User

aes.h

a guest
May 30th, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. #ifndef _AES_H
  2. #define _AES_H
  3.  
  4. #ifndef uint8
  5. #define uint8  unsigned char
  6. #endif
  7.  
  8. #ifndef uint32
  9. #define uint32 unsigned long int
  10. #endif
  11.  
  12. typedef struct
  13. {
  14.     uint32 erk[64];     /* encryption round keys */
  15.     uint32 drk[64];     /* decryption round keys */
  16.     int nr;             /* number of rounds */
  17. }
  18. aes_context;
  19.  
  20. int  aes_set_key( aes_context *ctx, uint8 *key, int nbits );
  21. void aes_encrypt( aes_context *ctx, uint8 input[16], uint8 output[16] );
  22. void aes_decrypt( aes_context *ctx, uint8 input[16], uint8 output[16] );
  23.  
  24. #endif /* aes.h */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement