mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-06 00:39:11 +00:00
30 lines
731 B
C++
30 lines
731 B
C++
#pragma once
|
|
#include <bitset>
|
|
#include <tc/types.h>
|
|
#include <tc/crypto/RsaKey.h>
|
|
#include <ntd/n3ds/es/ISigner.h>
|
|
|
|
#include <tc/InvalidOperationException.h>
|
|
#include <tc/ArgumentOutOfRangeException.h>
|
|
|
|
namespace ntd { namespace n3ds { namespace es {
|
|
|
|
class RsaSigner : public ntd::n3ds::es::ISigner
|
|
{
|
|
public:
|
|
RsaSigner(brd::es::ESSigType sig_type, const std::string& issuer, const tc::crypto::RsaKey& rsa_key);
|
|
|
|
const std::string& getIssuer();
|
|
|
|
brd::es::ESSigType getSigType();
|
|
|
|
bool signHash(const byte_t* hash, byte_t* signature);
|
|
|
|
bool verifyHash(const byte_t* hash, const byte_t* signature);
|
|
private:
|
|
brd::es::ESSigType mSigType;
|
|
std::string mIssuer;
|
|
tc::crypto::RsaKey mRsaKey;
|
|
};
|
|
|
|
}}} // namespace ntd::n3ds::es
|