RSAKeyImpl::ByteVec RSAKeyImpl::decryptionExponent() const { #if OPENSSL_VERSION_NUMBER >= 0x10100000L const BIGNUM* n = 0; const BIGNUM* e = 0; const BIGNUM* d = 0; RSA_get0_key(_pRSA, &n, &e, &d); return convertToByteVec(d); #else return convertToByteVec(_pRSA->d); #endif }
RSAKeyImpl::ByteVec RSAKeyImpl::modulus() const { #if OPENSSL_VERSION_NUMBER >= 0x10100000L const BIGNUM* n = 0; const BIGNUM* e = 0; const BIGNUM* d = 0; RSA_get0_key(_pRSA, &n, &e, &d); return convertToByteVec(n); #else return convertToByteVec(_pRSA->n); #endif }
RSAKeyImpl::ByteVec RSAKeyImpl::decryptionExponent() const { return convertToByteVec(_pRSA->d); }
RSAKeyImpl::ByteVec RSAKeyImpl::modulus() const { return convertToByteVec(_pRSA->n); }