Const cleanup
This commit is contained in:
parent
1e9038a8ba
commit
2eef24b7dc
@ -863,7 +863,7 @@ be shown on the Coldcard screen.
|
||||
|
||||
if not secret and not show_qr:
|
||||
# ask the Coldcard to show the QR (for password or TOTP shared secret)
|
||||
mode |= 0x80
|
||||
mode |= USER_AUTH_SHOW_QR
|
||||
|
||||
new_secret = dev.send_recv(CCProtocolPacker.create_user(username, mode, secret))
|
||||
|
||||
|
||||
@ -25,9 +25,10 @@ MAX_UPLOAD_LEN = const(2*MAX_TXN_LEN)
|
||||
MSG_SIGNING_MAX_LENGTH = const(240)
|
||||
|
||||
# Types of user auth we support
|
||||
USER_AUTH_TOTP = const(1) # RFC6238
|
||||
USER_AUTH_HOTP = const(2) # RFC4226
|
||||
USER_AUTH_HMAC = const(3) # PBKDF2('hmac-sha256', secret, sha256(psbt), PBKDF2_ITER_COUNT)
|
||||
USER_AUTH_TOTP = const(1) # RFC6238
|
||||
USER_AUTH_HOTP = const(2) # RFC4226
|
||||
USER_AUTH_HMAC = const(3) # PBKDF2('hmac-sha256', secret, sha256(psbt), PBKDF2_ITER_COUNT)
|
||||
USER_AUTH_SHOW_QR = const(0x80) # show secret on Coldcard screen (best for TOTP enroll)
|
||||
|
||||
MAX_USERNAME_LEN = 16
|
||||
PBKDF2_ITER_COUNT = 2500
|
||||
|
||||
Loading…
Reference in New Issue
Block a user