Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
local v = "0.1.0" | ||
|
||
package = "bgcrypto-hmac" | ||
version = v .. "-1" | ||
|
||
source = { | ||
url = "https://github.com/moteus/lua-bgcrypto-sha/archive/v" .. v .. ".zip", | ||
dir = "lua-bgcrypto-sha-" .. v, | ||
} | ||
|
||
description = { | ||
summary = "Keyed-Hashing for Message Authentication", | ||
homepage = "https://github.com/moteus/bgcrypto-sha", | ||
detailed = [[Work with SHA1/SHA2/MD5/RIPEMD160/etc. hash algorithms.]]; | ||
license = "BSD", | ||
} | ||
|
||
dependencies = { | ||
"lua >= 5.1, < 5.4", | ||
-- "bit32", | ||
} | ||
|
||
build = { | ||
copy_directories = {}, | ||
|
||
type = "builtin", | ||
|
||
modules = { | ||
['bgcrypto.private.bit'] = 'src/lua/private/bit.lua', | ||
['bgcrypto.hmac'] = 'src/lua/hmac.lua' | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
local v = "0.1.0" | ||
|
||
package = "bgcrypto-lmd5" | ||
version = v .. "-1" | ||
|
||
source = { | ||
url = "https://github.com/moteus/lua-bgcrypto-sha/archive/v" .. v .. ".zip", | ||
dir = "lua-bgcrypto-sha-" .. v, | ||
} | ||
|
||
description = { | ||
summary = "Wraps digest implementation from `lmd5` library.", | ||
homepage = "https://github.com/moteus/bgcrypto-sha", | ||
detailed = [[Provide bgcrypto.digest interface and implement hmac/pbkdf2 functions.]]; | ||
license = "BSD", | ||
} | ||
|
||
dependencies = { | ||
"lua >= 5.1, < 5.4", | ||
"lmd5", | ||
"bgcrypto-hmac", | ||
"bgcrypto-pbkdf2", | ||
} | ||
|
||
build = { | ||
copy_directories = {}, | ||
|
||
type = "builtin", | ||
|
||
modules = { | ||
['bgcrypto.private.digest'] = 'src/lua/private/digest.lua', | ||
['bgcrypto.md5'] = 'src/lua/md5.lua', | ||
['bgcrypto.ripemd160'] = 'src/lua/ripemd160.lua', | ||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
local v = "0.1.0" | ||
|
||
package = "bgcrypto-pbkdf2" | ||
version = v .. "-1" | ||
|
||
source = { | ||
url = "https://github.com/moteus/lua-bgcrypto-sha/archive/v" .. v .. ".zip", | ||
dir = "lua-bgcrypto-sha-" .. v, | ||
} | ||
|
||
description = { | ||
summary = "Password-Based Key Derivation Function 2", | ||
homepage = "https://github.com/moteus/bgcrypto-sha", | ||
detailed = [[Work with SHA1/SHA2/MD5/RIPEMD160/etc. hash algorithms.]]; | ||
license = "BSD", | ||
} | ||
|
||
dependencies = { | ||
"lua >= 5.1, < 5.4", | ||
-- "bit32", | ||
} | ||
|
||
build = { | ||
copy_directories = {}, | ||
|
||
type = "builtin", | ||
|
||
modules = { | ||
['bgcrypto.private.bit'] = 'src/lua/private/bit.lua', | ||
['bgcrypto.pbkdf2'] = 'src/lua/pbkdf2.lua' | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
local v = "0.1.0" | ||
|
||
package = "bgcrypto-sha" | ||
version = v .. "-1" | ||
|
||
source = { | ||
url = "https://github.com/moteus/lua-bgcrypto-sha/archive/v" .. v .. ".zip", | ||
dir = "lua-bgcrypto-sha-" .. v, | ||
} | ||
|
||
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(); | ||
} | ||
|