AusweisApp2
KeyDerivationFunction.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include <QByteArray>
10 #include <QCryptographicHash>
11 #include <QString>
12 
13 namespace governikus
14 {
15 
17 {
18  private:
19  QCryptographicHash::Algorithm mHashAlgorithm;
20  int mKeySize;
21  QByteArray deriveKey(const QByteArray& pK, const QByteArray& pNonce, quint32 pC);
22 
23  public:
29  explicit KeyDerivationFunction(const QByteArray& pPaceAlgorithm);
31 
35  bool isInitialized();
36 
42  QByteArray enc(const QByteArray& pSecret);
43 
49  QByteArray mac(const QByteArray& pSecret);
50 
56  QByteArray pi(const QString& pSecret);
57 
58 };
59 
60 } // namespace governikus
Definition: KeyDerivationFunction.h:17
bool isInitialized()
Returns true, if initialization succeeded, i.e.
Definition: KeyDerivationFunction.cpp:54
KeyDerivationFunction(const QByteArray &pPaceAlgorithm)
Creates a new instance with derivation function algorithm determined by parameter.
Definition: KeyDerivationFunction.cpp:18
QByteArray enc(const QByteArray &pSecret)
Derive the encryption key.
Definition: KeyDerivationFunction.cpp:60
QByteArray pi(const QString &pSecret)
Derive the password key.
Definition: KeyDerivationFunction.cpp:72
QByteArray mac(const QByteArray &pSecret)
Derive the MAC key.
Definition: KeyDerivationFunction.cpp:66
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15