Liking cljdoc? Tell your friends :D

fluree.crypto


account-id-from-messageclj/s

(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.
sourceraw docstring

account-id-from-privateclj/s

source

account-id-from-publicclj/s

(account-id-from-public public-key)
source

aes-decryptclj/s

(aes-decrypt x iv key)
(aes-decrypt x iv key output-format)
(aes-decrypt x iv key output-format input-format)
source

aes-encryptclj/s

(aes-encrypt x iv key)
(aes-encrypt x iv key output-format)
source

byte-array->stringclj/s

(byte-array->string s)
source

create-jwsclj/s

(create-jws s private-key)

Sign a string with the secp256k1 private key.

Sign a string with the secp256k1 private key.
sourceraw docstring

generate-key-pairclj/s

(generate-key-pair)
(generate-key-pair private)
source

generateKeyPaircljs

(generateKeyPair)
(generateKeyPair private)
source

normalize-stringclj/s

(normalize-string s)

Normalizes string for consistent hashing.

Normalizes string for consistent hashing.
sourceraw docstring

pub-key-from-messageclj/s

(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.
sourceraw docstring

pub-key-from-privateclj/s

(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.
sourceraw docstring

random-bytesclj/s

(random-bytes n)

Generates n random bytes.

Generates n random bytes.
sourceraw docstring

ripemd-160clj/s

(ripemd-160 x)
(ripemd-160 x output-format)
(ripemd-160 x output-format input-format)
source

scrypt-checkclj/s

(scrypt-check message encrypted & args)

Compares a message (string) with previously encrypted message (hex).

Compares a message (string) with previously encrypted message (hex). 
sourceraw docstring

scrypt-encryptclj/s

(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.
sourceraw docstring

sha2-256clj/s

(sha2-256 x)
(sha2-256 x output-format)
(sha2-256 x output-format input-format)
source

sha2-256-normalizeclj/s

(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.
sourceraw docstring

sha2-512clj/s

(sha2-512 x)
(sha2-512 x output-format)
(sha2-512 x output-format input-format)
source

sha2-512-normalizeclj/s

(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.
sourceraw docstring

sha3-256clj/s

(sha3-256 x)
(sha3-256 x output-format)
(sha3-256 x output-format input-format)
source

sha3-256-normalizeclj/s

(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.
sourceraw docstring

sha3-512clj/s

(sha3-512 x)
(sha3-512 x output-format)
(sha3-512 x output-format input-format)
source

sha3-512-normalizeclj/s

(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.
sourceraw docstring

sign-messageclj/s

(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).
sourceraw docstring

string->byte-arrayclj/s

(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.
sourceraw docstring

verify-jwsclj/s

(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.
sourceraw docstring

verify-signatureclj/s

(verify-signature pub-key message signature)

Verifies signature of message is valid.

Verifies signature of message is valid.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close