(request, secret, curve='ed25519', url_encode=False)
| 1739 | |
| 1740 | @staticmethod |
| 1741 | def eddsa(request, secret, curve='ed25519', url_encode=False): |
| 1742 | if isinstance(secret, str): |
| 1743 | secret = Exchange.encode(secret) |
| 1744 | private_key = ed25519.Ed25519PrivateKey.from_private_bytes(secret) if len(secret) == 32 else load_pem_private_key(secret, None) |
| 1745 | signature = private_key.sign(request) |
| 1746 | if url_encode: |
| 1747 | return Exchange.binary_to_urlencoded_base64(signature) |
| 1748 | |
| 1749 | return Exchange.binary_to_base64(signature) |
| 1750 | |
| 1751 | @staticmethod |
| 1752 | def json(data, params=None): |
no test coverage detected