mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
fixed tests by providing abstract methods to ecdsa.py
This commit is contained in:
parent
a852f5f66d
commit
c47d6b258c
@ -23,6 +23,10 @@ class SigningKey(metaclass=ABCMeta):
|
||||
def get_verifying_key(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def to_ascii(self, prefix, encoding):
|
||||
raise NotImplementedError
|
||||
|
||||
@staticmethod
|
||||
@abstractmethod
|
||||
def encode(private_value):
|
||||
@ -52,6 +56,10 @@ class VerifyingKey(metaclass=ABCMeta):
|
||||
def verify(self, data, signature):
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def to_ascii(self, prefix, encoding):
|
||||
raise NotImplementedError
|
||||
|
||||
@staticmethod
|
||||
@abstractmethod
|
||||
def encode(public_value):
|
||||
|
||||
@ -34,6 +34,12 @@ class EcdsaSigningKey(SigningKey):
|
||||
signature = signer.finalize()
|
||||
return binascii.hexlify(signature).decode('utf-8')
|
||||
|
||||
def get_verifying_key(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def to_ascii(self, prefix='', encoding='base58'):
|
||||
raise NotImplementedError
|
||||
|
||||
@staticmethod
|
||||
def encode(private_value):
|
||||
"""
|
||||
@ -99,6 +105,9 @@ class EcdsaVerifyingKey(VerifyingKey):
|
||||
|
||||
return True
|
||||
|
||||
def to_ascii(self, prefix='', encoding='base58'):
|
||||
raise NotImplementedError
|
||||
|
||||
@staticmethod
|
||||
def encode(public_value_x, public_value_y):
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user