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

Method rsa

python/ccxt/base/exchange.py:1483–1491  ·  view source on GitHub ↗
(request, secret, alg='sha256')

Source from the content-addressed store, hash-verified

1481
1482 @staticmethod
1483 def rsa(request, secret, alg='sha256'):
1484 algorithms = {
1485 "sha256": hashes.SHA256(),
1486 "sha384": hashes.SHA384(),
1487 "sha512": hashes.SHA512(),
1488 }
1489 algorithm = algorithms[alg]
1490 priv_key = load_pem_private_key(Exchange.encode(secret), None, backends.default_backend())
1491 return Exchange.binary_to_base64(priv_key.sign(Exchange.encode(request), padding.PKCS1v15(), algorithm))
1492
1493 @staticmethod
1494 def eth_abi_encode(types, args):

Callers 8

signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
jwtMethod · 0.45
sign_paramsMethod · 0.45

Calls 3

binary_to_base64Method · 0.80
encodeMethod · 0.45
signMethod · 0.45

Tested by

no test coverage detected