MCPcopy Create free account
hub / github.com/ccxt/ccxt / sigencode_strings_canonize

Function sigencode_strings_canonize

python/ccxt/static_dependencies/ecdsa/util.py:213–218  ·  view source on GitHub ↗
(r, s, order, v=None)

Source from the content-addressed store, hash-verified

211# these enforce low S values, by negating the value (modulo the order) if above order/2
212# see CECKey::Sign() https://github.com/bitcoin/bitcoin/blob/master/src/key.cpp#L214
213def sigencode_strings_canonize(r, s, order, v=None):
214 if s > order / 2:
215 s = order - s
216 if v is not None:
217 v ^= 1
218 return sigencode_strings(r, s, order, v)
219
220
221def sigencode_string_canonize(r, s, order, v=None):

Callers

nothing calls this directly

Calls 1

sigencode_stringsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…