AusweisApp2
Lade ...
Suche ...
Keine Treffer
KeyDerivationFunction.h
gehe zur Dokumentation dieser Datei
1
7#pragma once
8
9#include <QByteArray>
10#include <QCryptographicHash>
11
12namespace governikus
13{
14
16{
17 private:
18 QCryptographicHash::Algorithm mHashAlgorithm;
19 int mKeySize;
20 [[nodiscard]] QByteArray deriveKey(const QByteArray& pK, const QByteArray& pNonce, quint32 pC) const;
21
22 public:
28 explicit KeyDerivationFunction(const QByteArray& pPaceAlgorithm);
30
34 [[nodiscard]] bool isInitialized() const;
35
41 QByteArray enc(const QByteArray& pSecret);
42
48 QByteArray mac(const QByteArray& pSecret);
49
55 QByteArray pi(const QByteArray& pSecret);
56
57};
58
59} // namespace governikus
Definition: KeyDerivationFunction.h:16
bool isInitialized() const
Returns true, if initialization succeeded, i.e.
Definition: KeyDerivationFunction.cpp:54
QByteArray enc(const QByteArray &pSecret)
Derive the encryption key.
Definition: KeyDerivationFunction.cpp:60
QByteArray mac(const QByteArray &pSecret)
Derive the MAC key.
Definition: KeyDerivationFunction.cpp:66
QByteArray pi(const QByteArray &pSecret)
Derive the password key.
Definition: KeyDerivationFunction.cpp:72
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15