@chainsafe/libp2p-noise
Preparing search index...
ICryptoInterface
Interface ICryptoInterface
Underlying crypto implementation, meant to be overridable
interface
ICryptoInterface
{
chaCha20Poly1305Decrypt
(
ciphertext
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
,
nonce
:
Uint8Array
,
ad
:
Uint8Array
,
k
:
Uint8Array
,
dst
?:
Uint8Array
<
ArrayBufferLike
>
,
)
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
;
chaCha20Poly1305Encrypt
(
plaintext
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
,
nonce
:
Uint8Array
,
ad
:
Uint8Array
,
k
:
Uint8Array
,
)
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
;
generateX25519KeyPair
()
:
KeyPair
;
generateX25519KeyPairFromSeed
(
seed
:
Uint8Array
)
:
KeyPair
;
generateX25519SharedKey
(
privateKey
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
,
publicKey
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
,
)
:
Uint8Array
;
getHKDF
(
ck
:
Uint8Array
,
ikm
:
Uint8Array
,
)
:
[
Uint8Array
<
ArrayBufferLike
>
,
Uint8Array
<
ArrayBufferLike
>
,
Uint8Array
<
ArrayBufferLike
>
,
]
;
hashSHA256
(
data
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
)
:
Uint8Array
;
}
Index
Methods
cha
Cha20
Poly1305
Decrypt
cha
Cha20
Poly1305
Encrypt
generate
X25519
Key
Pair
generate
X25519
Key
Pair
From
Seed
generate
X25519
Shared
Key
get
HKDF
hash
SHA256
Methods
cha
Cha20
Poly1305
Decrypt
chaCha20Poly1305Decrypt
(
ciphertext
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
,
nonce
:
Uint8Array
,
ad
:
Uint8Array
,
k
:
Uint8Array
,
dst
?:
Uint8Array
<
ArrayBufferLike
>
,
)
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
Parameters
ciphertext
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
nonce
:
Uint8Array
ad
:
Uint8Array
k
:
Uint8Array
Optional
dst
:
Uint8Array
<
ArrayBufferLike
>
Returns
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
cha
Cha20
Poly1305
Encrypt
chaCha20Poly1305Encrypt
(
plaintext
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
,
nonce
:
Uint8Array
,
ad
:
Uint8Array
,
k
:
Uint8Array
,
)
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
Parameters
plaintext
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
nonce
:
Uint8Array
ad
:
Uint8Array
k
:
Uint8Array
Returns
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
generate
X25519
Key
Pair
generateX25519KeyPair
()
:
KeyPair
Returns
KeyPair
generate
X25519
Key
Pair
From
Seed
generateX25519KeyPairFromSeed
(
seed
:
Uint8Array
)
:
KeyPair
Parameters
seed
:
Uint8Array
Returns
KeyPair
generate
X25519
Shared
Key
generateX25519SharedKey
(
privateKey
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
,
publicKey
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
,
)
:
Uint8Array
Parameters
privateKey
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
publicKey
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
Returns
Uint8Array
get
HKDF
getHKDF
(
ck
:
Uint8Array
,
ikm
:
Uint8Array
,
)
:
[
Uint8Array
<
ArrayBufferLike
>
,
Uint8Array
<
ArrayBufferLike
>
,
Uint8Array
<
ArrayBufferLike
>
,
]
Parameters
ck
:
Uint8Array
ikm
:
Uint8Array
Returns
[
Uint8Array
<
ArrayBufferLike
>
,
Uint8Array
<
ArrayBufferLike
>
,
Uint8Array
<
ArrayBufferLike
>
,
]
hash
SHA256
hashSHA256
(
data
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
)
:
Uint8Array
Parameters
data
:
Uint8Array
<
ArrayBufferLike
>
|
Uint8ArrayList
Returns
Uint8Array
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
cha
Cha20
Poly1305
Decrypt
cha
Cha20
Poly1305
Encrypt
generate
X25519
Key
Pair
generate
X25519
Key
Pair
From
Seed
generate
X25519
Shared
Key
get
HKDF
hash
SHA256
@chainsafe/libp2p-noise
Loading...
Underlying crypto implementation, meant to be overridable