Annotate

teal-src/util/crypto.d.tl @ 12835:6a97d448cb1e

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Tue, 10 Jan 2023 21:14:07 +0100
parent 12695:6aaa604fdfd5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12695
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 local record lib
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2 record key
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 private_pem : function (key) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 public_pem : function (key) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 get_type : function (key) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 end
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 generate_ed25519_keypair : function () : key
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 ed25519_sign : function (key, string) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 ed25519_verify : function (key, string, string) : boolean
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 ecdsa_sha256_sign : function (key, string) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 ecdsa_sha256_verify : function (key, string, string) : boolean
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 parse_ecdsa_signature : function (string) : string, string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 build_ecdsa_signature : function (string, string) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17 import_private_pem : function (string) : key
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 import_public_pem : function (string) : key
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20 aes_128_gcm_encrypt : function (key, string, string) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21 aes_128_gcm_decrypt : function (key, string, string) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
22 aes_256_gcm_encrypt : function (key, string, string) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
23 aes_256_gcm_decrypt : function (key, string, string) : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
24
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
25
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26 version : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27 _LIBCRYPTO_VERSION : string
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
28 end
6aaa604fdfd5 util.crypto: Add Teal type specification
Kim Alvefur <zash@zash.se>
parents:
diff changeset
29 return lib