mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
trezor.crypto.hashlib: remove HashIO (lives as HashWriter somewhere else)
This commit is contained in:
parent
f9827666f8
commit
c95ed063db
@ -5,15 +5,3 @@ from TrezorCrypto import Sha256 as sha256
|
||||
from TrezorCrypto import Sha512 as sha512
|
||||
from TrezorCrypto import Sha3_256 as sha3_256
|
||||
from TrezorCrypto import Sha3_512 as sha3_512
|
||||
|
||||
class HashIO:
|
||||
|
||||
def __init__(self, hashfunc=sha256):
|
||||
self.hashfunc = hashfunc
|
||||
self.ctx = hashfunc()
|
||||
|
||||
def write(self, data):
|
||||
self.ctx.update(data)
|
||||
|
||||
def getvalue(self):
|
||||
return self.ctx.digest()
|
||||
|
Loading…
Reference in New Issue
Block a user