Marmot-TS
Preparing search index...
@internet-privacy/marmot-ts/mls
Hpke
Interface Hpke
interface
Hpke
{
keyLength
:
number
;
nonceLength
:
number
;
decryptAead
(
key
:
Uint8Array
,
nonce
:
Uint8Array
,
aad
:
Uint8Array
<
ArrayBufferLike
>
|
undefined
,
ciphertext
:
Uint8Array
,
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
;
deriveKeyPair
(
ikm
:
Uint8Array
,
)
:
Promise
<
{
privateKey
:
PrivateKey
;
publicKey
:
PublicKey
}
>
;
encryptAead
(
key
:
Uint8Array
,
nonce
:
Uint8Array
,
aad
:
Uint8Array
<
ArrayBufferLike
>
|
undefined
,
plaintext
:
Uint8Array
,
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
;
exportPrivateKey
(
k
:
PrivateKey
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
;
exportPublicKey
(
k
:
PublicKey
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
;
exportSecret
(
publicKey
:
PublicKey
,
exporterContext
:
Uint8Array
,
length
:
number
,
info
:
Uint8Array
,
)
:
Promise
<
{
enc
:
Uint8Array
;
secret
:
Uint8Array
}
>
;
generateKeyPair
()
:
Promise
<
{
privateKey
:
PrivateKey
;
publicKey
:
PublicKey
}
,
>
;
importPrivateKey
(
k
:
Uint8Array
)
:
Promise
<
PrivateKey
>
;
importPublicKey
(
k
:
Uint8Array
)
:
Promise
<
PublicKey
>
;
importSecret
(
privateKey
:
PrivateKey
,
exporterContext
:
Uint8Array
,
kemOutput
:
Uint8Array
,
length
:
number
,
info
:
Uint8Array
,
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
;
open
(
privateKey
:
PrivateKey
,
kemOutput
:
Uint8Array
,
ciphertext
:
Uint8Array
,
info
:
Uint8Array
,
aad
?:
Uint8Array
<
ArrayBufferLike
>
,
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
;
seal
(
publicKey
:
PublicKey
,
plaintext
:
Uint8Array
,
info
:
Uint8Array
,
aad
?:
Uint8Array
<
ArrayBufferLike
>
,
)
:
Promise
<
{
ct
:
Uint8Array
;
enc
:
Uint8Array
}
>
;
}
Index
Properties
key
Length
nonce
Length
Methods
decrypt
Aead
derive
Key
Pair
encrypt
Aead
export
Private
Key
export
Public
Key
export
Secret
generate
Key
Pair
import
Private
Key
import
Public
Key
import
Secret
open
seal
Properties
key
Length
keyLength
:
number
nonce
Length
nonceLength
:
number
Methods
decrypt
Aead
decryptAead
(
key
:
Uint8Array
,
nonce
:
Uint8Array
,
aad
:
Uint8Array
<
ArrayBufferLike
>
|
undefined
,
ciphertext
:
Uint8Array
,
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
Parameters
key
:
Uint8Array
nonce
:
Uint8Array
aad
:
Uint8Array
<
ArrayBufferLike
>
|
undefined
ciphertext
:
Uint8Array
Returns
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
derive
Key
Pair
deriveKeyPair
(
ikm
:
Uint8Array
,
)
:
Promise
<
{
privateKey
:
PrivateKey
;
publicKey
:
PublicKey
}
>
Parameters
ikm
:
Uint8Array
Returns
Promise
<
{
privateKey
:
PrivateKey
;
publicKey
:
PublicKey
}
>
encrypt
Aead
encryptAead
(
key
:
Uint8Array
,
nonce
:
Uint8Array
,
aad
:
Uint8Array
<
ArrayBufferLike
>
|
undefined
,
plaintext
:
Uint8Array
,
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
Parameters
key
:
Uint8Array
nonce
:
Uint8Array
aad
:
Uint8Array
<
ArrayBufferLike
>
|
undefined
plaintext
:
Uint8Array
Returns
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
export
Private
Key
exportPrivateKey
(
k
:
PrivateKey
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
Parameters
k
:
PrivateKey
Returns
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
export
Public
Key
exportPublicKey
(
k
:
PublicKey
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
Parameters
k
:
PublicKey
Returns
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
export
Secret
exportSecret
(
publicKey
:
PublicKey
,
exporterContext
:
Uint8Array
,
length
:
number
,
info
:
Uint8Array
,
)
:
Promise
<
{
enc
:
Uint8Array
;
secret
:
Uint8Array
}
>
Parameters
publicKey
:
PublicKey
exporterContext
:
Uint8Array
length
:
number
info
:
Uint8Array
Returns
Promise
<
{
enc
:
Uint8Array
;
secret
:
Uint8Array
}
>
generate
Key
Pair
generateKeyPair
()
:
Promise
<
{
privateKey
:
PrivateKey
;
publicKey
:
PublicKey
}
>
Returns
Promise
<
{
privateKey
:
PrivateKey
;
publicKey
:
PublicKey
}
>
import
Private
Key
importPrivateKey
(
k
:
Uint8Array
)
:
Promise
<
PrivateKey
>
Parameters
k
:
Uint8Array
Returns
Promise
<
PrivateKey
>
import
Public
Key
importPublicKey
(
k
:
Uint8Array
)
:
Promise
<
PublicKey
>
Parameters
k
:
Uint8Array
Returns
Promise
<
PublicKey
>
import
Secret
importSecret
(
privateKey
:
PrivateKey
,
exporterContext
:
Uint8Array
,
kemOutput
:
Uint8Array
,
length
:
number
,
info
:
Uint8Array
,
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
Parameters
privateKey
:
PrivateKey
exporterContext
:
Uint8Array
kemOutput
:
Uint8Array
length
:
number
info
:
Uint8Array
Returns
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
open
open
(
privateKey
:
PrivateKey
,
kemOutput
:
Uint8Array
,
ciphertext
:
Uint8Array
,
info
:
Uint8Array
,
aad
?:
Uint8Array
<
ArrayBufferLike
>
,
)
:
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
Parameters
privateKey
:
PrivateKey
kemOutput
:
Uint8Array
ciphertext
:
Uint8Array
info
:
Uint8Array
Optional
aad
:
Uint8Array
<
ArrayBufferLike
>
Returns
Promise
<
Uint8Array
<
ArrayBufferLike
>
>
seal
seal
(
publicKey
:
PublicKey
,
plaintext
:
Uint8Array
,
info
:
Uint8Array
,
aad
?:
Uint8Array
<
ArrayBufferLike
>
,
)
:
Promise
<
{
ct
:
Uint8Array
;
enc
:
Uint8Array
}
>
Parameters
publicKey
:
PublicKey
plaintext
:
Uint8Array
info
:
Uint8Array
Optional
aad
:
Uint8Array
<
ArrayBufferLike
>
Returns
Promise
<
{
ct
:
Uint8Array
;
enc
:
Uint8Array
}
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
key
Length
nonce
Length
Methods
decrypt
Aead
derive
Key
Pair
encrypt
Aead
export
Private
Key
export
Public
Key
export
Secret
generate
Key
Pair
import
Private
Key
import
Public
Key
import
Secret
open
seal
Marmot-TS
Loading...