Fix hexadecimal master key decoding
This commit is contained in:
@@ -553,6 +553,10 @@ class ExportImportTest(unittest.TestCase):
|
||||
|
||||
|
||||
class CryptoTest(unittest.TestCase):
|
||||
def test_decode_hex_master_key(self) -> None:
|
||||
expected = bytes(range(crypto.KEY_BYTES))
|
||||
self.assertEqual(crypto.decode_master_key(expected.hex()), expected)
|
||||
|
||||
def test_envelope(self) -> None:
|
||||
master = crypto.generate_master_key()
|
||||
blob = crypto.encrypt_private_key(b"secret", "key-id", crypto.decode_master_key(master))
|
||||
|
||||
Reference in New Issue
Block a user