Optional function to generate cryptographically secure random bytes
Decrypts data encrypted with encryptContent
with the
transit private key.
encrypted content.
the hex string of the ECDSA private key to use for decryption. If not provided, will use user's appPrivateKey.
decrypted content.
Encrypts the data provided with the app public key.
data to encrypt
Stringified ciphertext object
Calculate the base64 encoded string length for a given input length. This is equivalent to the byte length when the string is ASCII or UTF8-8 encoded.
Use utils.randomBytes to replace randombytes dependency Generates a buffer with random bytes of given length
For return type compatibility converting utils.randomBytes return value to buffer
Verify message signature with recoverable public key
Verifies a Clarity compatible signed message using a public key. The
signature
option needs to be in RSV format.
Generated using TypeDoc
@stacks/encryption
Encryption functions used by Stacks.js packages.
Installation
Encrypt and decrypt string
Sign content using ECDSA
encryptMnemonic
anddecryptMnemonic
Private key to address
Make private key