-
Notifications
You must be signed in to change notification settings - Fork 6
/
BrowserCrypto.yml
150 lines (144 loc) · 4.41 KB
/
BrowserCrypto.yml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
### YamlMime:TSType
name: BrowserCrypto
uid: '@azure/msal-browser.BrowserCrypto'
package: '@azure/msal-browser'
summary: >-
This class implements functions used by the browser library to perform
cryptography operations such as
hashing and encoding. It also has helper functions to validate the
availability of specific APIs.
fullName: BrowserCrypto
remarks: ''
isPreview: false
isDeprecated: false
type: class
constructors:
- name: 'BrowserCrypto(Logger, CryptoOptions)'
uid: '@azure/msal-browser.BrowserCrypto.constructor'
package: '@azure/msal-browser'
summary: ''
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'new BrowserCrypto(logger: Logger, cryptoOptions?: CryptoOptions)'
parameters:
- id: logger
type: Logger
description: ''
- id: cryptoOptions
type: <xref uid="@azure/msal-browser.CryptoOptions" />
description: ''
methods:
- name: exportJwk(CryptoKey)
uid: '@azure/msal-browser.BrowserCrypto.exportJwk'
package: '@azure/msal-browser'
summary: Export key as Json Web Key (JWK)
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function exportJwk(key: CryptoKey): Promise<JsonWebKey>'
parameters:
- id: key
type: CryptoKey
description: ''
return:
description: ''
type: Promise<JsonWebKey>
- name: 'generateKeyPair(boolean, Array<KeyUsage>)'
uid: '@azure/msal-browser.BrowserCrypto.generateKeyPair'
package: '@azure/msal-browser'
summary: Generates a keypair based on current keygen algorithm config.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function generateKeyPair(extractable: boolean, usages: Array<KeyUsage>):
Promise<CryptoKeyPair>
parameters:
- id: extractable
type: boolean
description: ''
- id: usages
type: Array<KeyUsage>
description: |+
return:
description: ''
type: Promise<CryptoKeyPair>
- name: getRandomValues(Uint8Array)
uid: '@azure/msal-browser.BrowserCrypto.getRandomValues'
package: '@azure/msal-browser'
summary: Populates buffer with cryptographically random values.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getRandomValues(dataBuffer: Uint8Array): Uint8Array'
parameters:
- id: dataBuffer
type: Uint8Array
description: |+
return:
description: ''
type: Uint8Array
- name: 'importJwk(JsonWebKey, boolean, Array<KeyUsage>)'
uid: '@azure/msal-browser.BrowserCrypto.importJwk'
package: '@azure/msal-browser'
summary: 'Imports key as Json Web Key (JWK), can set extractable and usages.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function importJwk(key: JsonWebKey, extractable: boolean, usages:
Array<KeyUsage>): Promise<CryptoKey>
parameters:
- id: key
type: JsonWebKey
description: ''
- id: extractable
type: boolean
description: ''
- id: usages
type: Array<KeyUsage>
description: |+
return:
description: ''
type: Promise<CryptoKey>
- name: sha256Digest(string)
uid: '@azure/msal-browser.BrowserCrypto.sha256Digest'
package: '@azure/msal-browser'
summary: Returns a sha-256 hash of the given dataString as an ArrayBuffer.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function sha256Digest(dataString: string): Promise<ArrayBuffer>'
parameters:
- id: dataString
type: string
description: |+
return:
description: ''
type: Promise<ArrayBuffer>
- name: 'sign(CryptoKey, ArrayBuffer)'
uid: '@azure/msal-browser.BrowserCrypto.sign'
package: '@azure/msal-browser'
summary: Signs given data with given key
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function sign(key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer>'
parameters:
- id: key
type: CryptoKey
description: ''
- id: data
type: ArrayBuffer
description: |+
return:
description: ''
type: Promise<ArrayBuffer>