INNER CODE UNIT · Python
secure
polhenarejos/pico-hsm · tools/pico-hsm-tool.py:344
def secure(picohsm, args):
slck = SecureLock(picohsm)
if (args.subcommand == 'enable'):
slck.enable_device_aut()
elif (args.subcommand == 'unlock'):
slck.unlock_device()
elif (args.subcommand == 'disable'):
slck.disable_device_aut()
def cipher(picohsm, args):
if (args.file_in):
fin = open(args.file_in, 'rb')
else:
fin = sys.stdin.buffer
enc = fin.read()
fin.close()
iv = args.iv
if (args.iv and args.hex):