☰
@nfen/webcrypto-ts
Version 0.1.8
Exports
. .
AesShared
Alg
Functions
decrypt
encrypt
exportKey
generateKey
importKey
unwrapKey
wrapKey
?
Namespace
aes/shared
.
AesShared
source
·
[
−
]
Functions
source
decrypt
source
<
T
>
(
algorithm
:
EnforcedAesGcmParams
|
EnforcedAesCtrParams
|
EnforcedAesCbcParams
, key
:
T
, data
:
BufferSource
)
:
Promise
<
ArrayBuffer
>
source
encrypt
source
<
T
>
(
algorithm
:
EnforcedAesGcmParams
|
EnforcedAesCtrParams
|
EnforcedAesCbcParams
, key
:
T
, data
:
BufferSource
)
:
Promise
<
ArrayBuffer
>
source
exportKey
source
<
T
>
(
format
:
KeyFormat
, key
:
T
)
:
Promise
<
JsonWebKey
|
ArrayBuffer
>
source
generateKey
source
<
T
>
(
algorithm
:
EnforcedAesKeyGenParams
, extractable
?:
boolean
, keyUsages
?:
KeyUsage
[]
)
:
Promise
<
T
>
source
importKey
source
<
T
>
(
format
:
KeyFormat
, key
:
BufferSource
|
JsonWebKey
, algorithm
:
EnforcedAesKeyAlgorithms
, extractable
?:
boolean
, keyUsages
?:
KeyUsage
[]
)
:
Promise
<
T
>
source
unwrapKey
source
<
T
>
(
format
:
KeyFormat
, wrappedKey
:
BufferSource
, wrappedKeyAlgorithm
:
EnforcedImportParams
, unwrappingKey
:
T
, unwrappingKeyAlgorithm
:
EnforcedAesParams
, extractable
?:
boolean
, keyUsages
?:
KeyUsage
[]
)
:
Promise
<
CryptoKey
>
source
wrapKey
source
<
T
>
(
format
:
KeyFormat
, key
:
CryptoKey
, wrappingkey
:
T
, wrapAlgorithm
:
EnforcedAesParams
)
:
Promise
<
ArrayBuffer
>