(account-id-from-message message signature)
Given a message and signature, returns the corresponding account id only if the signature is valid. If invalid, will throw exception.
Given a message and signature, returns the corresponding account id only if the signature is valid. If invalid, will throw exception.
(aes-decrypt x iv key)
(aes-decrypt x iv key output-format)
(aes-decrypt x iv key output-format input-format)
(create-jws s private-key)
Sign a string with the secp256k1 private key.
Sign a string with the secp256k1 private key.
(normalize-string s)
Normalizes string for consistent hashing.
Normalizes string for consistent hashing.
(pub-key-from-message message signature)
Returns public key, and verifies message is correctly signed. If not correctly signed, throws exception.
Returns public key, and verifies message is correctly signed. If not correctly signed, throws exception.
(pub-key-from-private private-key)
Take a private key as either a hex string or BigInteger (clj) bignumber (cljs), returns as a hex string.
Take a private key as either a hex string or BigInteger (clj) bignumber (cljs), returns as a hex string.
(random-bytes n)
Generates n random bytes.
Generates n random bytes.
(ripemd-160 x)
(ripemd-160 x output-format)
(ripemd-160 x output-format input-format)
(scrypt-check message encrypted & args)
Compares a message (string) with previously encrypted message (hex).
Compares a message (string) with previously encrypted message (hex).
(scrypt-encrypt message & args)
Encrypts a message (string) using a salt (bytes). Returns the encrypted message in hex.
Encrypts a message (string) using a salt (bytes). Returns the encrypted message in hex.
(sha2-256-normalize s)
(sha2-256-normalize s output-format)
sha2-256 hash of provided string after normalizing string.
sha2-256 hash of provided string after normalizing string.
(sha2-512-normalize s)
(sha2-512-normalize s output-format)
sha2-512 hash of provided string after normalizing string.
sha2-512 hash of provided string after normalizing string.
(sha3-256-normalize s)
(sha3-256-normalize s output-format)
sha3-256 hash of provided string after normalizing string.
sha3-256 hash of provided string after normalizing string.
(sha3-512-normalize s)
(sha3-512-normalize s output-format)
sha3-512 hash of provided string after normalizing string.
sha3-512 hash of provided string after normalizing string.
(sign-message message private-key)
Sign some message with provided private key. Message must be a byte-array or string. Private key must be hex-encoded or a BigInteger(clj)/bignumber(cljs).
Sign some message with provided private key. Message must be a byte-array or string. Private key must be hex-encoded or a BigInteger(clj)/bignumber(cljs).
(string->byte-array s)
Normalizes string then converts to a byte-array. If value is already a byte-array, returns original value.
Normalizes string then converts to a byte-array. If value is already a byte-array, returns original value.
(verify-jws jws)
Verify the supplied compact JWS. If valid, returns the base64 decoded payload and the public key. If invalid, returns nil.
Verify the supplied compact JWS. If valid, returns the base64 decoded payload and the public key. If invalid, returns nil.
(verify-signature pub-key message signature)
Verifies signature of message is valid.
Verifies signature of message is valid.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close