forked from p15670423/monkey
Island: Modify error messages in EncryptionKey32Bytes
This commit is contained in:
parent
2e443f229a
commit
9654e869a7
|
@ -1,8 +1,9 @@
|
|||
class EncryptionKey32Bytes(bytes):
|
||||
def __init__(self, key: bytes):
|
||||
if not isinstance(key, bytes):
|
||||
raise TypeError("Key is not of type `bytes`")
|
||||
raise TypeError("'key' must be of type 'bytes'")
|
||||
|
||||
if len(key) == 32:
|
||||
self.key = key
|
||||
else:
|
||||
raise ValueError("Key size should be 32 bytes")
|
||||
raise ValueError("'key' must be exactly 32 bytes")
|
||||
|
|
Loading…
Reference in New Issue