mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-01-19 22:39:31 +08:00
trival
This commit is contained in:
parent
77eff2e6b1
commit
9f0c2c6f35
5
aes.c
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.
|
This is an implementation of the AES algorithm, specifically ECB and CBC mode.
|
||||||
|
4
aes.h
4
aes.h
@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* this file comes from https://github.com/kokke/tiny-AES128-C
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _AES_H_
|
#ifndef _AES_H_
|
||||||
#define _AES_H_
|
#define _AES_H_
|
||||||
|
|
||||||
|
@ -20,6 +20,9 @@ auth_mode_t auth_mode=auth_sum;
|
|||||||
cipher_mode_t cipher_mode=cipher_xor;
|
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) {
|
unsigned int crc32h(unsigned char *message,int len) {
|
||||||
int i, crc;
|
int i, crc;
|
||||||
unsigned int byte, c;
|
unsigned int byte, c;
|
||||||
|
4
md5.c
4
md5.c
@ -4,6 +4,10 @@
|
|||||||
#include <stdint.h>
|
#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.
|
// Constants are the integer part of the sines of integers (in radians) * 2^32.
|
||||||
const uint32_t k[64] = {
|
const uint32_t k[64] = {
|
||||||
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee ,
|
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee ,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user