(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).
(biginteger->hex bn)
Hex-encode java.math.BigInteger (clj) or sjcl.bn (cljs).
Hex-encode java.math.BigInteger (clj) or sjcl.bn (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.
(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).
(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
(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
(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.
(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
(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).
(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).
(pad-hex hex)
Pads a hex value with a leading zero if odd.
Pads a hex value with a leading zero if odd.
(pad-to-length s len)
Left-pads string s to length len with zeroes.
Left-pads string s to length len with zeroes.
(x962-decode public-key curve)
Decode a X9.62 encoded public key from hex
Decode a X9.62 encoded public key from hex
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close