mirror of https://github.com/nucypher/pyUmbral.git
keys: adjust error type
parent
4f6f1741b7
commit
768ac3ae9e
|
@ -57,7 +57,7 @@ def test_secret_key_str():
|
|||
def test_secret_key_hash():
|
||||
sk = SecretKey.random()
|
||||
# Insecure Python hash, shouldn't be available.
|
||||
with pytest.raises(NotImplementedError):
|
||||
with pytest.raises(RuntimeError):
|
||||
hash(sk)
|
||||
|
||||
|
||||
|
@ -70,7 +70,7 @@ def test_secret_key_factory_str():
|
|||
def test_secret_key_factory_hash():
|
||||
skf = SecretKeyFactory.random()
|
||||
# Insecure Python hash, shouldn't be available.
|
||||
with pytest.raises(NotImplementedError):
|
||||
with pytest.raises(RuntimeError):
|
||||
hash(skf)
|
||||
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class SecretKey(Serializable):
|
|||
return f"{self.__class__.__name__}:..."
|
||||
|
||||
def __hash__(self):
|
||||
raise NotImplementedError("Hashing secret objects is not secure")
|
||||
raise RuntimeError("Hashing secret objects is not secure")
|
||||
|
||||
def secret_scalar(self):
|
||||
return self._scalar_key
|
||||
|
@ -162,4 +162,4 @@ class SecretKeyFactory(Serializable):
|
|||
return f"{self.__class__.__name__}:..."
|
||||
|
||||
def __hash__(self):
|
||||
raise NotImplementedError("Hashing secret objects is not secure")
|
||||
raise RuntimeError("Hashing secret objects is not secure")
|
||||
|
|
Loading…
Reference in New Issue