Preparing search index...
The search index is not available
@kynesyslabs/demosdk
@kynesyslabs/demosdk
encryption
Cryptography
Class Cryptography
Index
Constructors
constructor
Properties
ed25519
rsa
Methods
load
load
Encrypted
load
From
Buffer
String
load
From
Hex
new
new
From
Seed
save
save
Encrypted
save
To
Hex
sign
verify
Constructors
constructor
new
Cryptography
(
)
:
Cryptography
Returns
Cryptography
Properties
Static
ed25519
ed25519
:
{
sign
:
(
(
message
:
string
,
privateKey
:
any
)
=>
NativeBuffer
)
;
verify
:
(
(
signed
:
string
,
signature
:
any
,
publicKey
:
any
)
=>
boolean
)
;
}
= ...
Static
rsa
rsa
:
{
decrypt
:
(
(
message
:
string
,
privateKey
?:
any
)
=>
[
boolean
,
any
]
)
;
encrypt
:
(
(
message
:
string
,
publicKey
:
any
)
=>
[
boolean
,
any
]
)
;
}
= ...
Methods
Static
load
load
(
path
,
isFile
?
)
:
Promise
<
KeyPair
>
Parameters
path
:
string
isFile
:
boolean
= true
Returns
Promise
<
KeyPair
>
Static
load
Encrypted
load
Encrypted
(
path
,
password
)
:
Promise
<
KeyPair
>
Parameters
path
:
string
password
:
string
Returns
Promise
<
KeyPair
>
Static
load
From
Buffer
String
load
From
Buffer
String
(
content
)
:
KeyPair
Parameters
content
:
string
Returns
KeyPair
Static
load
From
Hex
load
From
Hex
(
content
)
:
KeyPair
Parameters
content
:
string
Returns
KeyPair
Static
new
new
(
)
:
{}
Returns
{}
Static
new
From
Seed
new
From
Seed
(
seed
)
:
{}
Creates a new keypair from a mnemonic
Parameters
seed
:
string
|
Uint8Array
<
ArrayBufferLike
>
|
Buffer
<
ArrayBufferLike
>
White-space separated string of words
Returns
{}
A new keypair
Static
save
save
(
keypair
,
path
,
mode
?
)
:
Promise
<
void
>
Parameters
keypair
:
KeyPair
path
:
string
mode
:
string
= "hex"
Returns
Promise
<
void
>
Static
save
Encrypted
save
Encrypted
(
keypair
,
path
,
password
)
:
Promise
<
void
>
Parameters
keypair
:
KeyPair
path
:
string
password
:
string
Returns
Promise
<
void
>
Static
save
To
Hex
save
To
Hex
(
forgeBuffer
)
:
string
Parameters
forgeBuffer
:
PrivateKey
Returns
string
Static
sign
sign
(
message
,
privateKey
)
:
NativeBuffer
Parameters
message
:
string
privateKey
:
any
Returns
NativeBuffer
Static
verify
verify
(
signed
,
signature
,
publicKey
)
:
boolean
Parameters
signed
:
string
signature
:
any
publicKey
:
any
Returns
boolean
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
ed25519
rsa
Methods
load
load
Encrypted
load
From
Buffer
String
load
From
Hex
new
new
From
Seed
save
save
Encrypted
save
To
Hex
sign
verify
@kynesyslabs/demosdk
Loading...
Creates a new keypair from a mnemonic