Comparison

teal-src/util/hashes.d.tl @ 11432:113f3912c7cb

util: Add Teal interface definition files Enables writing code in Teal that is aware of the interfaces and function prototypes in these other utils. Could also be used to do type checks on Lua sources, but this tends to have a lot of noise.
author Kim Alvefur <zash@zash.se>
date Tue, 09 Mar 2021 14:36:46 +0100
child 11459:86904555bffc
comparison
equal deleted inserted replaced
11431:4874b54af344 11432:113f3912c7cb
1 local type hash = function (msg : string, hex : boolean) : string
2 local type hmac = function (key : string, msg : string, hex : boolean) : string
3 local type kdf = function (pass : string, salt : string, i : number) : string
4
5 local record lib
6 sha1 : hash
7 sha256 : hash
8 sha224 : hash
9 sha384 : hash
10 sha512 : hash
11 md5 : hash
12 hmac_sha1 : hmac
13 hmac_sha256 : hmac
14 hmac_sha512 : hmac
15 hmac_md5 : hmac
16 scram_Hi_sha1 : kdf
17 pbkdf2_hmac_sha1 : kdf
18 pbkdf2_hmac_sha256 : kdf
19 version : string
20 end
21 return lib