(async) new generate(type, param)
Securely generates a new key of the given type and paramter.
Supported key types
Eliptic curve keys:
typemust be 'EC'parammust be supported curve type, from:secp256k1
Octet byte sequence:
typemust be 'oct'parammust be supported bit length, from:128,256or512
Parameters:
| Name | Type | Description |
|---|---|---|
type |
String | |
param |
String | Number |