Annotate

teal-src/util/crypto.d.tl @ 12828:f33887f925e1

net.server_epoll: Remove delay on last main loop iteration when quitting Main difference is that timers are not checked unconditionally before each poll, only when running out of previous poll results (hidden by util.poll). This removes a final poll at shutdown that usually delays the 'not quitting' condition check by one second.
author Kim Alvefur <zash@zash.se>
date Fri, 06 Jan 2023 04:38:39 +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