deno.land / x / jose@v5.2.4 / runtime / interfaces.d.ts

interfaces.d.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import type { JWK, KeyLike } from '../types.d.ts'import type { PEMImportOptions } from '../key/import.ts'
type AsyncOrSync<T> = Promise<T> | T
export interface TimingSafeEqual { (a: Uint8Array, b: Uint8Array): boolean}export interface SignFunction { (alg: string, key: unknown, data: Uint8Array): Promise<Uint8Array>}export interface VerifyFunction { (alg: string, key: unknown, signature: Uint8Array, data: Uint8Array): Promise<boolean>}export interface AesKwWrapFunction { (alg: string, key: unknown, cek: Uint8Array): AsyncOrSync<Uint8Array>}export interface AesKwUnwrapFunction { (alg: string, key: unknown, encryptedKey: Uint8Array): AsyncOrSync<Uint8Array>}export interface RsaEsEncryptFunction { (alg: string, key: unknown, cek: Uint8Array): AsyncOrSync<Uint8Array>}export interface RsaEsDecryptFunction { (alg: string, key: unknown, encryptedKey: Uint8Array): AsyncOrSync<Uint8Array>}export interface Pbes2KWEncryptFunction { ( alg: string, key: unknown, cek: Uint8Array, p2c?: number, p2s?: Uint8Array, ): Promise<{ encryptedKey: Uint8Array p2c: number p2s: string }>}export interface Pbes2KWDecryptFunction { ( alg: string, key: unknown, encryptedKey: Uint8Array, p2c: number, p2s: Uint8Array, ): Promise<Uint8Array>}export interface EncryptFunction { ( enc: string, plaintext: Uint8Array, cek: unknown, iv: Uint8Array | undefined, aad: Uint8Array, ): AsyncOrSync<{ ciphertext: Uint8Array tag: Uint8Array | undefined iv: Uint8Array | undefined }>}export interface DecryptFunction { ( enc: string, cek: unknown, ciphertext: Uint8Array, iv: Uint8Array | undefined, tag: Uint8Array | undefined, additionalData: Uint8Array, ): AsyncOrSync<Uint8Array>}export interface FetchFunction { (url: URL, timeout: number, options?: any): Promise<{ [propName: string]: unknown }>}export interface DigestFunction { (digest: 'sha256' | 'sha384' | 'sha512', data: Uint8Array): AsyncOrSync<Uint8Array>}export interface JWKImportFunction { (jwk: JWK): AsyncOrSync<KeyLike>}export interface PEMImportFunction { (pem: string, alg: string, options?: PEMImportOptions): AsyncOrSync<KeyLike>}interface ExportFunction<T> { (key: unknown): AsyncOrSync<T>}export type JWKExportFunction = ExportFunction<JWK>export type PEMExportFunction = ExportFunction<string>
jose

Version Info

Tagged at
a month ago