mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-16 13:01:04 +02:00
Update to work with squeaklib 0.3.1 (#66)
This commit is contained in:
parent
ce6991214a
commit
220b1eed22
5 changed files with 9 additions and 9 deletions
|
|
@ -204,7 +204,7 @@ def run():
|
|||
|
||||
# Decrypt the decryption key
|
||||
decryption_key = encrypted_decryption_key.get_decryption_key(preimage, iv)
|
||||
serialized_decryption_key = decryption_key.serialize()
|
||||
serialized_decryption_key = decryption_key.get_bytes()
|
||||
|
||||
print("new decryption key: " + str(decryption_key))
|
||||
print("new decryption key: " + str(serialized_decryption_key))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
importlib_resources==1.4.0
|
||||
squeaklib
|
||||
squeaklib==0.3.1
|
||||
argparse
|
||||
googleapis-common-protos
|
||||
grpcio
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
importlib_resources==1.4.0
|
||||
squeaklib
|
||||
squeaklib==0.3.1
|
||||
argparse
|
||||
googleapis-common-protos
|
||||
grpcio
|
||||
|
|
|
|||
|
|
@ -64,14 +64,14 @@ class PostgresDb():
|
|||
squeak.hashReplySqk.hex(),
|
||||
squeak.hashBlock.hex(),
|
||||
squeak.nBlockHeight,
|
||||
bytes(squeak.scriptPubKey),
|
||||
squeak.vchScriptPubKey,
|
||||
squeak.vchEncryptionKey,
|
||||
squeak.vchEncDatakey.hex(),
|
||||
squeak.vchIv.hex(),
|
||||
squeak.nTime,
|
||||
squeak.nNonce,
|
||||
bytes(squeak.encContent.vchEncContent).hex(),
|
||||
bytes(squeak.scriptSig),
|
||||
squeak.vchScriptSig,
|
||||
str(squeak.GetAddress()),
|
||||
squeak.vchDecryptionKey,
|
||||
))
|
||||
|
|
@ -96,15 +96,15 @@ class PostgresDb():
|
|||
hashReplySqk=bytes.fromhex(row[4]),
|
||||
hashBlock=bytes.fromhex(row[5]),
|
||||
nBlockHeight=row[6],
|
||||
scriptPubKey=CScript(row[7].tobytes()),
|
||||
vchScriptPubKey=row[7],
|
||||
vchEncryptionKey=row[8],
|
||||
vchEncDatakey=bytes.fromhex(row[9]),
|
||||
vchIv=bytes.fromhex((row[10])),
|
||||
nTime=row[11],
|
||||
nNonce=row[12],
|
||||
encContent=CSqueakEncContent(bytes.fromhex((row[13]))),
|
||||
scriptSig=CScript((row[14].tobytes())),
|
||||
vchDecryptionKey=(row[16]),
|
||||
vchScriptSig=row[14],
|
||||
vchDecryptionKey=row[16],
|
||||
)
|
||||
return squeak
|
||||
|
||||
|
|
|
|||
|
|
@ -46,5 +46,5 @@ def example_squeak(signing_key):
|
|||
@pytest.fixture
|
||||
def bad_squeak(signing_key):
|
||||
squeak = make_squeak(signing_key, 'hello!', )
|
||||
squeak.SetDataKey(b'deadbeef')
|
||||
squeak.ClearDecryptionKey()
|
||||
return squeak
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue