File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 23
23
sample_privencryptionkey = \
24
24
b'4b0b73a54e19b059dc274ab69df095fe699f43b17397bca26fdf40f4d7400a3a'
25
25
26
+ # [chan] bitmessage
27
+ sample_wif_privsigningkey = \
28
+ b'a2e8b841a531c1c558ee0680c396789c7a2ea3ac4795ae3f000caf9fe367d144'
29
+ sample_wif_privencryptionkey = \
30
+ b'114ec0e2dca24a826a0eed064b0405b0ac148abc3b1d52729697f4d7b873fdc6'
31
+
26
32
sample_factor = \
27
33
66858749573256452658262553961707680376751171096153613379801854825275240965733
28
34
# G * sample_factor
@@ -59,6 +65,19 @@ def test_base58(self):
59
65
18875720106589866286514488037355423395410802084648916523381 ,
60
66
256 ), 256 , 58 ), b'2DBPTgeSawWYZceFD69AbDT5q4iUWtj1ZN' )
61
67
68
+ def test_wif (self ):
69
+ """Decode WIFs of [chan] bitmessage and check the keys"""
70
+ self .assertEqual (
71
+ sample_wif_privsigningkey ,
72
+ arithmetic .changebase (arithmetic .changebase (
73
+ b'5K42shDERM5g7Kbi3JT5vsAWpXMqRhWZpX835M2pdSoqQQpJMYm' , 58 , 256
74
+ )[1 :- 4 ], 256 , 16 ))
75
+ self .assertEqual (
76
+ sample_wif_privencryptionkey ,
77
+ arithmetic .changebase (arithmetic .changebase (
78
+ b'5HwugVWm31gnxtoYcvcK7oywH2ezYTh6Y4tzRxsndAeMi6NHqpA' , 58 , 256
79
+ )[1 :- 4 ], 256 , 16 ))
80
+
62
81
def test_decode (self ):
63
82
"""Decode sample privsigningkey from hex to int and compare to factor"""
64
83
self .assertEqual (
You can’t perform that action at this time.
0 commit comments