Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@burstjs/crypto
Advanced tools
Cryptographic functions for building Burstcoin apps.
Install using npm:
npm install @burstjs/crypto
or using yarn:
yarn add @burstjs/crypto
A set of useful converter methods for crypto operations.
Decrypt an encrypted message
Generate the Master Public Key and Master Private Key for a new passphrase
Generate a signature for the 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)
Generates a signed message digest
Convert hex string of the public key to the account id
Verify a signature for given message
* h1 = sha256(sha256(transactionHex)_keygen(sha256(transactionHex_privateKey)).publicKey)
==
sha256(sha256(transactionHex)_verify(v, h1, publickey)) = h2
A set of useful converter methods for crypto operations.
Produces an array of the specified number of bytes to represent the integer value. Default output encodes ints in little endian format. Handles signed as well as unsigned integers. Due to limitations in JavaScript's number format, x cannot be a true 64 bit integer (8 bytes).
Kind: static method of Converter
Decrypt an encrypted message
Kind: global function
Returns:
The decrypted content
Param | Description |
---|---|
encryptedBase64 | encryprts data in base64 format |
key | The secret key |
Generate the Master Public Key and Master Private Key for a new passphrase
Kind: global function
Returns:
EC-KCDSA sign key pair + agreement key
Param | Description |
---|---|
passPhrase | The passphrase |
Generate a signature for the 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)
Kind: global function
Param | Description |
---|---|
messageHex | The data in hexadecimal representation |
privateKey | The private key for signing |
Generates a signed message digest
Kind: global function
Returns:
The signed message digest
Param | Description |
---|---|
unsignedTransactionHex | The unsigned message |
signature | The signature |
Convert hex string of the public key to the account id
Kind: global function
Returns:
The numeric account Id
Param | Description |
---|---|
publicKey | The public key |
Verify a signature for given message
* h1 = sha256(sha256(transactionHex)_keygen(sha256(transactionHex_privateKey)).publicKey)
==
sha256(sha256(transactionHex)_verify(v, h1, publickey)) = h2
Kind: global function
Param | Description |
---|---|
signature | The signature to be verified |
messageHex | The message data in hexadecimal representation |
publicKey | The public key |
FAQs
Cryptographic functions for building Burstcoin apps.
The npm package @burstjs/crypto receives a total of 18 weekly downloads. As such, @burstjs/crypto popularity was classified as not popular.
We found that @burstjs/crypto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.