[#1] Add method get_private_key_from_wif
Signed-off-by: ilyas585 <niyazov2023@gmail.com>
This commit is contained in:
parent
480d288e2a
commit
97bc53c6f4
6 changed files with 68 additions and 0 deletions
16
tests/crypto/test_key_extension.py
Normal file
16
tests/crypto/test_key_extension.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from frostfs_api.crypto.key_extension import KeyExtension
|
||||
from tests.helpers.convert import convert_bytes_format_127_to_256
|
||||
|
||||
|
||||
class TestKeyExtension:
|
||||
WIF = "L1YS4myg3xHPvi3FHeLaEt7G8upwJaWL5YLV7huviuUtXFpzBMqZ"
|
||||
PRIVATE_KEY = [
|
||||
-128, -5, 30, -36, -118, 85, -67, -6, 81, 43, 93, -38, 106, 21, -88, 127, 15, 125, -79, -17, -40, 77, -15,
|
||||
122, -88, 72, 109, -47, 125, -80, -40, -38
|
||||
]
|
||||
|
||||
def test_get_private_key_from_wif_success(self, client_key_extension: KeyExtension):
|
||||
private_key = client_key_extension.get_private_key_from_wif(self.WIF)
|
||||
|
||||
assert len(private_key) == 32, f"Not correct len of private key, expected: 32 Actual: {len(private_key)} "
|
||||
assert private_key == bytes(convert_bytes_format_127_to_256(self.PRIVATE_KEY)), f"Not match private key, Expected: {self.PRIVATE_KEY}, Actual: {private_key}"
|
Loading…
Add table
Add a link
Reference in a new issue