1 btye version
generated iv
encrypted ciphertext
base58Encoded concated
construct Mac for password pre-check secretKey + ciphertext as mac input then THash convert to Mac hex string and return
derived key hex string
encrypted hex string
mac as hex string
create CovenantSQL keystore
master password user typed-in
kdf salt
address version
private key encode version
keystore object
create CovenantSQL private key use ECDS(secp256k1) for private key generation
privateKey hex string
deconstruct base58 encoded string for CovenantSQL chain recover
base58Encoded concated
{ privateKeyVersion 1 btye version iv generated iv ciphertext encrypted ciphertext }
symmetric decryption
encrypted ciphertext in hex (48 btyes)
serectKey string in hex (16 btyes)
iv string in hex (16 btyes because of AES 128bit blocksize)
decrypted text in hex
derive secret key from password user typed-in use sha256x2 as key derivation function(kdf)
user's password in utf8
default salt in hex
secretKey string in hex (16 bytes because of sha256)
symmetric encryption
input text to be encrypted
serectKey string in hex (16 btyes)
iv string in hex (16 btyes because of AES 128bit blocksize)
encrypted ciphertext in hex (48 btyes)
randomly generate iv
default length is 16 btyes because of AES 128bit blocksize
iv in hex
check cipher availablility
boolean of cipher availablility
check private key validity
private key hex string
boolean of private key validity
construct keystore json
wallet address
kdf salt
mac value
encrypted text
symmetric iv
version hex
keystore object
create public key from private key use secp256k1 public key generation with compress enabled
private key hex string
publicKey hex string
convert address from public key
public key hex string
version hex string to differ MainNet & TestNet
address hex string
recover private key from keystore and password
private key string in hex
Calculate the sha256 digest of a string.
import { sha256 } from 'typescript-starter'
sha256('test')
// => '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08'
sha256 message digest
A faster implementation of sha256 which requires the native Node.js module. Browser consumers should use sha256, instead.
import { sha256Native as sha256 } from 'typescript-starter'
sha256('test')
// => '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08'
sha256 message digest
verify secret key from password and salt
old password in utf8
default salt in hex
secret key in hex
boolean of verify success or not
Generated using TypeDoc
construct base58 encoded string for CovenantSQL chain recover privateKeyVersion(1B) + iv(16B) + ciphertext(48B) as concated hex then base58 encoded the concated and return