CryptoKeyDataRSAComponents.cpp [plain text]
#include "config.h"
#include "CryptoKeyDataRSAComponents.h"
#if ENABLE(SUBTLE_CRYPTO)
namespace WebCore {
CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents(const Vector<uint8_t>& modulus, const Vector<uint8_t>& exponent)
: CryptoKeyData(CryptoKeyData::Format::RSAComponents)
, m_type(Type::Public)
, m_modulus(modulus)
, m_exponent(exponent)
{
}
CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents(const Vector<uint8_t>& modulus, const Vector<uint8_t>& exponent, const Vector<uint8_t>& privateExponent)
: CryptoKeyData(CryptoKeyData::Format::RSAComponents)
, m_type(Type::Private)
, m_modulus(modulus)
, m_exponent(exponent)
, m_privateExponent(privateExponent)
, m_hasAdditionalPrivateKeyParameters(false)
{
}
CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents(const Vector<uint8_t>& modulus, const Vector<uint8_t>& exponent, const Vector<uint8_t>& privateExponent, const PrimeInfo& firstPrimeInfo, const PrimeInfo& secondPrimeInfo, const Vector<PrimeInfo>& otherPrimeInfos)
: CryptoKeyData(CryptoKeyData::Format::RSAComponents)
, m_type(Type::Private)
, m_modulus(modulus)
, m_exponent(exponent)
, m_privateExponent(privateExponent)
, m_hasAdditionalPrivateKeyParameters(true)
, m_firstPrimeInfo(firstPrimeInfo)
, m_secondPrimeInfo(secondPrimeInfo)
, m_otherPrimeInfos(otherPrimeInfos)
{
}
CryptoKeyDataRSAComponents::~CryptoKeyDataRSAComponents()
{
}
}
#endif // ENABLE(SUBTLE_CRYPTO)