forked from cloudfreexiao/lcrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlcrypt.h
executable file
·116 lines (85 loc) · 2.54 KB
/
lcrypt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#define LUA_LIB
#include <lua.h>
#include <lauxlib.h>
#include "compat-5.3.h"
#include <string.h>
#include <openssl/ripemd.h>
#include <openssl/rc4.h>
#include <openssl/md4.h>
#include <openssl/md5.h>
#include <openssl/sha.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
#include <openssl/hmac.h>
#include <openssl/rand.h>
#define SMALL_CHUNK 256
int luuid(lua_State *L);
int lguid(lua_State *L);
int ltohex(lua_State *L);
int lfromhex(lua_State *L);
int lcrc32(lua_State *L);
int lcrc64(lua_State *L);
int ladler32(lua_State *L);
int lb64encode(lua_State *L);
int lb64decode(lua_State *L);
int lurlencode(lua_State *L);
int lurldecode(lua_State *L);
int ldesencode(lua_State *L);
int ldesdecode(lua_State *L);
int ldes_encrypt(lua_State *L);
int ldes_decrypt(lua_State *L);
int ldhsecret(lua_State *L);
int ldhexchange(lua_State *L);
int lhashkey(lua_State *L);
int lhmac_hash(lua_State *L);
int lhmac64(lua_State *L);
int lhmac64_md5(lua_State *L);
int lmd4(lua_State *L);
int lmd5(lua_State *L);
int lsha128(lua_State *L);
int lsha224(lua_State *L);
int lsha256(lua_State *L);
int lsha384(lua_State *L);
int lsha512(lua_State *L);
int lripemd160(lua_State *L);
int lhmac_md4(lua_State *L);
int lhmac_md5(lua_State *L);
int lhmac_sha128(lua_State *L);
int lhmac_sha224(lua_State *L);
int lhmac_sha256(lua_State *L);
int lhmac_sha384(lua_State *L);
int lhmac_sha512(lua_State *L);
int lhmac_ripemd160(lua_State *L);
int lhmac_pbkdf2(lua_State *L);
int lrc4(lua_State *L);
int laes_ecb_encrypt(lua_State *L);
int laes_cbc_encrypt(lua_State *L);
int laes_cfb_encrypt(lua_State *L);
int laes_ofb_encrypt(lua_State *L);
int laes_ctr_encrypt(lua_State *L);
int laes_gcm_encrypt(lua_State *L);
int laes_ecb_decrypt(lua_State *L);
int laes_cbc_decrypt(lua_State *L);
int laes_cfb_decrypt(lua_State *L);
int laes_ofb_decrypt(lua_State *L);
int laes_ctr_decrypt(lua_State *L);
int laes_gcm_decrypt(lua_State *L);
int lrsa_public_key_encode(lua_State *L);
int lrsa_private_key_decode(lua_State *L);
int lrsa_private_key_encode(lua_State *L);
int lrsa_public_key_decode(lua_State *L);
int lrsa_sign(lua_State *L);
int lrsa_verify(lua_State *L);
int lsm3(lua_State *L);
int lhmac_sm3(lua_State *L);
int lsm2keygen(lua_State *L);
int lsm2sign(lua_State *L);
int lsm2verify(lua_State *L);
int lsm4_cbc_encrypt(lua_State *L);
int lsm4_cbc_decrypt(lua_State *L);
int lsm4_ecb_encrypt(lua_State *L);
int lsm4_ecb_decrypt(lua_State *L);
int lsm4_ofb_encrypt(lua_State *L);
int lsm4_ofb_decrypt(lua_State *L);
int lsm4_ctr_encrypt(lua_State *L);
int lsm4_ctr_decrypt(lua_State *L);