mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-02-07 19:18:23 +00:00
Using file_out parameter.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
e1983f7bcc
commit
7c877ebea2
1 changed files with 7 additions and 1 deletions
|
|
@ -428,7 +428,13 @@ def cipher(card, args):
|
|||
data += [0x83, len(args.aad)] + list(args.aad)
|
||||
|
||||
ret = send_apdu(card, [0x80, 0x78], int(args.key), alg, data)
|
||||
sys.stdout.buffer.write(bytes(ret))
|
||||
if (args.file_out):
|
||||
fout = open(args.file_out, 'wb')
|
||||
else:
|
||||
fout = sys.stdout.buffer
|
||||
fout.write(bytes(ret))
|
||||
if (args.file_out):
|
||||
fout.close()
|
||||
|
||||
def main(args):
|
||||
sys.stderr.buffer.write(b'Pico HSM Tool v1.8\n')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue