teal-src/util/crypto.d.tl
author Matthew Wild <mwild1@gmail.com>
Thu, 13 Oct 2022 09:55:36 +0100
changeset 12775 e9fcc69ea508
parent 12699 6aaa604fdfd5
permissions -rw-r--r--
util.cache: Add some missing test cases Found via mutation testing.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12699
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