This commit is contained in:
wangyu 2017-08-04 17:19:40 +08:00
parent 77eff2e6b1
commit 9f0c2c6f35
4 changed files with 16 additions and 0 deletions

5
aes.c

@ -1,3 +1,8 @@
/*
* this file comes from https://github.com/kokke/tiny-AES128-C
*/
/*
This is an implementation of the AES algorithm, specifically ECB and CBC mode.

4
aes.h

@ -1,3 +1,7 @@
/*
* this file comes from https://github.com/kokke/tiny-AES128-C
*/
#ifndef _AES_H_
#define _AES_H_

@ -20,6 +20,9 @@ auth_mode_t auth_mode=auth_sum;
cipher_mode_t cipher_mode=cipher_xor;
/*
* this function comes from http://www.hackersdelight.org/hdcodetxt/crc.c.txt
*/
unsigned int crc32h(unsigned char *message,int len) {
int i, crc;
unsigned int byte, c;

4
md5.c

@ -4,6 +4,10 @@
#include <stdint.h>
/*
* this file comes from https://github.com/pod32g/MD5/blob/master/md5.c
*/
// Constants are the integer part of the sines of integers (in radians) * 2^32.
const uint32_t k[64] = {
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee ,