Decrypt an encrypted message
encrypted data in base64 format
The secret key
The decrypted content, or undefined
if failed
Decrypts an encrypted cipher text
The encrypted data
The senders public key in hex format
The recipients private (agreement) key in hex format
The original plain text
Decrypts an encrypted Message
The encrypted message
The senders public key in hex format
The recipients private (agreement) key in hex format
The original message
Symmetrically encrypts a text using an arbitrary key
The message/text to be encrypted
The key used
The encrypted message as Base64 string
Encrypts arbitrary data for P2P message/data exchange using asymmetric encryption
Data to be encrypted
The recipients public key in hexadecimal format
The senders private (agreement) key hexadecimal format
The encrypted Data
Encrypts arbitrary message (UTF-8 compatible) for P2P message/data exchange using asymmetric encryption
Message to be encrypted
The recipients public key hexadecimal format
The senders private (agreement) key hexadecimal format
The encrypted Message
Generate the Master Public Key and Master Private Keys for a new passphrase
The passphrase
EC-KCDSA sign key pair + agreement key
Generate a signature for a transaction
Method:
s = sign(sha256(sha256(transactionHex)_keygen(sha256(sha256(transactionHex)_privateKey)).publicKey),
sha256(sha256(transactionHex)_privateKey),
privateKey)
p = sha256(sha256(transactionHex)_keygen(sha256(transactionHex_privateKey)).publicKey)
The data in hexadecimal representation
The private key for signing
The signature in hexadecimal format
Generates a signed message digest, which can be sent to BRS API then
The unsigned message
The signature
The signed message digest
Convert hex string of the public key to the account id
The public key
The numeric account Id
Hash string into hex string
An arbitrary text
the hash for that string in hex format
Verify a signature for given message
* h1 = sha256(sha256(transactionHex)_keygen(sha256(transactionHex_privateKey)).publicKey)
==
sha256(sha256(transactionHex)_verify(v, h1, publickey)) = h2
The signature to be verified
The message data in hexadecimal representation
The public key
true, if signature is valid, otherwise false
This package contains all cryptographic functions needed for Burstcoin.