30 lines
1002 B
C++
30 lines
1002 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: IRSAPrivate.hpp
|
|
Date: 2021-7-1
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Crypto::RSA
|
|
{
|
|
// Remember: there is no such thing as private encryption
|
|
class IRSAPrivate
|
|
{
|
|
public:
|
|
virtual bool Sign(const void *buffer, AuUInt length,
|
|
EHashType method, EPaddingType type,
|
|
AuList<AuUInt8> &out) = 0;
|
|
virtual bool Sign(const AuList<AuUInt8> &in,
|
|
EHashType method, EPaddingType type,
|
|
AuList<AuUInt8> &out) = 0;
|
|
|
|
virtual bool Decrypt(const void *buffer, AuUInt length, EPaddingType type, AuList<AuUInt8> &out) = 0;
|
|
virtual bool Decrypt(const AuList<AuUInt8> &in, EPaddingType type, AuList<AuUInt8> &out) = 0;
|
|
|
|
virtual AuSPtr<IRSAPublic> ToPublic() = 0;
|
|
|
|
virtual bool ToKey(const RSAMeta &meta, AuList<AuUInt8> &out) = 0;
|
|
};
|
|
} |