Skip to content

Commit

Permalink
HSMAUTH: remove card_crypto from SessionKeys class
Browse files Browse the repository at this point in the history
  • Loading branch information
elibon99 committed Aug 1, 2023
1 parent 6f9a037 commit 96a2660
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions yubikit/hsmauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,17 @@ class SessionKeys:
key_senc: bytes
key_smac: bytes
key_srmac: bytes
card_crypto: Optional[bytes]

@classmethod
def parse(cls, response) -> "SessionKeys":
key_senc = response[:16]
key_smac = response[16:32]
key_srmac = response[32:48]
card_crypto = None
if len(response) == 56:
card_crypto = response[48:]

return cls(
key_senc=key_senc,
key_smac=key_smac,
key_srmac=key_srmac,
card_crypto=card_crypto,
)


Expand Down

0 comments on commit 96a2660

Please sign in to comment.