AusweisApp
Lade ...
Suche ...
Keine Treffer
KeyDerivationFunction.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "SecurityProtocol.h"
12
13#include <QByteArray>
14#include <QCryptographicHash>
15
16namespace governikus
17{
18
20{
21 private:
22 QCryptographicHash::Algorithm mHashAlgorithm;
23 int mKeySize;
24 [[nodiscard]] QByteArray deriveKey(const QByteArray& pK, const QByteArray& pNonce, quint32 pC) const;
25
26 public:
34
38 [[nodiscard]] bool isInitialized() const;
39
46
53
59 QByteArray pi(const QByteArray& pSecret) const;
60
61};
62
63} // namespace governikus
Definition KeyDerivationFunction.h:20
bool isInitialized() const
Returns true, if initialization succeeded, i.e.
Definition KeyDerivationFunction.cpp:28
QByteArray mac(const QByteArray &pSecret, const QByteArray &pNonce=QByteArray()) const
Derive the MAC key.
Definition KeyDerivationFunction.cpp:40
QByteArray pi(const QByteArray &pSecret) const
Derive the password key.
Definition KeyDerivationFunction.cpp:46
KeyDerivationFunction(const SecurityProtocol &pSecurityProtocol)
Creates a new instance with derivation function algorithm determined by parameter.
Definition KeyDerivationFunction.cpp:17
QByteArray enc(const QByteArray &pSecret, const QByteArray &pNonce=QByteArray()) const
Derive the encryption key.
Definition KeyDerivationFunction.cpp:34
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114