LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
epasscrypto.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <logicalaccess/plugins/cards/epass/lla_cards_epass_api.hpp>
5
6namespace logicalaccess
7{
8class LLA_CARDS_EPASS_API EPassCrypto : public ISO24727Crypto
9{
10 public:
11 explicit EPassCrypto();
12 explicit EPassCrypto(const std::string &mrz);
13
14 void reset(const std::string &mrz);
15
16 static ByteVector adjust_key_parity(const ByteVector &key);
17
18 void compute_session_keys(const ByteVector &k_icc,
19 const ByteVector &random_icc) override;
20
21 ByteVector compute_enc_key(const ByteVector &seed,
22 const std::string hash_algo = "sha1",
23 unsigned char keylen = 16);
24
25 ByteVector compute_mac_key(const ByteVector &seed,
26 const std::string hash_algo = "sha1",
27 unsigned char keylen = 16);
28
42 ByteVector compute_mac(std::shared_ptr<openssl::SymmetricCipher> cipher,
43 const ByteVector &in, const ByteVector &k_mac,
44 const ByteVector &iv = {},
45 const ByteVector &ssc = {}) override;
46};
47}
Definition: epasscrypto.hpp:9
Definition: iso24727crypto.hpp:14
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9