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

Method to_der

python/ccxt/static_dependencies/ecdsa/keys.py:251–259  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

249 return der.topem(self.to_der(), "EC PRIVATE KEY")
250
251 def to_der(self):
252 # SEQ([int(1), octetstring(privkey),cont[0], oid(secp224r1),
253 # cont[1],bitstring])
254 encoded_vk = b'\x00\x04' + self.get_verifying_key().to_string()
255 return der.encode_sequence(der.encode_integer(1),
256 der.encode_octet_string(self.to_string()),
257 der.encode_constructed(0, self.curve.encoded_oid),
258 der.encode_constructed(1, der.encode_bitstring(encoded_vk)),
259 )
260
261 def get_verifying_key(self):
262 return self.verifying_key

Callers 1

to_pemMethod · 0.95

Calls 2

to_stringMethod · 0.95
get_verifying_keyMethod · 0.95

Tested by

no test coverage detected