Liking cljdoc? Tell your friends :D

fluree.crypto.encodings


biginteger->bytesclj/s

(biginteger->bytes bn)
(biginteger->bytes bn l)

Return bytes of java.math.BigInteger (clj) or sjcl.bn (cljs).

Return bytes of java.math.BigInteger (clj) or sjcl.bn (cljs).
raw docstring

biginteger->hexclj/s

(biginteger->hex bn)

Hex-encode java.math.BigInteger (clj) or sjcl.bn (cljs).

Hex-encode java.math.BigInteger (clj) or sjcl.bn (cljs).
raw docstring

bn-even?cljs

(bn-even? sjcl-bn)

Tests is an sjcl.bn (cljs) is even. Returns boolean if so.

Tests is an sjcl.bn (cljs) is even. Returns boolean if so.
raw docstring

byte->intclj/s

(byte->int the-bytes)

bytes->bigintegerclj/s

(bytes->biginteger ba)

Return bytes of java.math.BigInteger (clj) or sjcl.bn (cljs).

Return bytes of java.math.BigInteger (clj) or sjcl.bn (cljs).
raw docstring

compute-pointclj/s

(compute-point y-even? x-coordinate curve)

Compute an elliptic curve point for a y-coordinate parity and x-coordinate

Compute an elliptic curve point for a y-coordinate parity and x-coordinate
raw docstring

DER-decodeclj/s

(DER-decode asn1)

Decodes a list of numbers including an optional recovery byte, following BitCoin's convention

Decodes a list of numbers including an optional recovery byte, following BitCoin's convention
raw docstring

DER-decode-ECDSA-signatureclj/s

(DER-decode-ECDSA-signature ecdsa)

Formats an ECDSA signature from hex. Returns R, S and recover as hex values.

Formats an ECDSA signature from hex.
Returns R, S and recover as hex values.
raw docstring

DER-encode-ECDSA-signatureclj/s

(DER-encode-ECDSA-signature R S recover curve)

Create a DER encoded signature. Both R and S should be bigintegers (clj) /bignumbers (cljs). recover should also be biginteger

Create a DER encoded signature.
Both R and S should be bigintegers (clj) /bignumbers (cljs).
recover should also be biginteger
raw docstring

hex->bigintegerclj/s

(hex->biginteger hex)

Return bytes of java.math.BigInteger (clj) or sjcl.bn (cljs).

Return bytes of java.math.BigInteger (clj) or sjcl.bn (cljs).
raw docstring

modular-square-rootcljs

(modular-square-root n modulus)

Compute the square root of a number modulo a prime. Number and modulus should be big numbers (bn).

Compute the square root of a number modulo a prime.
Number and modulus should be big numbers (bn).
raw docstring

pad-hexclj/s

(pad-hex hex)

Pads a hex value with a leading zero if odd.

Pads a hex value with a leading zero if odd.
raw docstring

pad-to-lengthclj/s

(pad-to-length s len)

Left-pads string s to length len with zeroes.

Left-pads string s to length len with zeroes.
raw docstring

x962-decodeclj/s

(x962-decode public-key curve)

Decode a X9.62 encoded public key from hex

Decode a X9.62 encoded public key from hex
raw docstring

x962-encodeclj/s

(x962-encode x-coord y-coord)
(x962-encode x-coord y-coord compressed?)

Encodes x and y coords in hex to X9.62 with optional compression (default true). x coords and y coords should be supplied in hex format.

Encodes x and y coords in hex to X9.62 with optional compression (default true).
x coords and y coords should be supplied in hex format.
raw docstring

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

× close