-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbgcrypto-sha-scm-0.rockspec
47 lines (39 loc) · 1.04 KB
/
bgcrypto-sha-scm-0.rockspec
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
package = "bgcrypto-sha"
version = "scm-0"
source = {
url = "https://github.com/moteus/lua-bgcrypto-sha/archive/master.zip",
dir = "lua-bgcrypto-sha-master",
}
description = {
summary = "SHA1/SHA2 digest library",
homepage = "https://github.com/moteus/bgcrypto-sha",
detailed = [[Binding to Dr Brian Gladman's implementation of SHA/HMAC algorithm.]];
license = "BSD",
}
dependencies = {
"lua >= 5.1, < 5.4",
-- "bit32",
}
local function make_module()
local result = {}
local names = {'sha1','sha224','sha256','sha384','sha512',
'sha512_128','sha512_192','sha512_224','sha512_256',
}
for i = 1, #names do
local name = names[i]
result['bgcrypto.' .. name] = {
sources = {
'src/l52util.c', 'src/sha/sha1.c', 'src/sha/sha2.c',
'src/sha/hmac.c', 'src/l' .. name ..'.c'
},
incdirs = {'src/sha'},
defines = {'RETURN_VALUES', 'VOID_RETURN=void', 'INT_RETURN=int'}
}
end
return result
end
build = {
copy_directories = {"test"},
type = "builtin",
modules = make_module();
}