Source release 19.3.0
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
#ifndef WVOEC_UTIL_RSA_KEY_H_
|
||||
#define WVOEC_UTIL_RSA_KEY_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
#include "OEMCryptoCENC.h"
|
||||
#include "wv_class_utils.h"
|
||||
|
||||
namespace wvoec {
|
||||
namespace util {
|
||||
@@ -61,6 +62,9 @@ class RsaPrivateKey;
|
||||
|
||||
class RsaPublicKey {
|
||||
public:
|
||||
~RsaPublicKey();
|
||||
WVCDM_DISALLOW_COPY_AND_MOVE(RsaPublicKey);
|
||||
|
||||
// Creates a new public key equivalent of the provided private key.
|
||||
static std::unique_ptr<RsaPublicKey> New(const RsaPrivateKey& private_key);
|
||||
|
||||
@@ -176,15 +180,8 @@ class RsaPublicKey {
|
||||
std::vector<uint8_t> EncryptEncryptionKey(
|
||||
const std::string& encryption_key) const;
|
||||
|
||||
~RsaPublicKey();
|
||||
|
||||
RsaPublicKey(const RsaPublicKey&) = delete;
|
||||
RsaPublicKey(RsaPublicKey&&) = delete;
|
||||
const RsaPublicKey& operator=(const RsaPublicKey&) = delete;
|
||||
RsaPublicKey& operator=(RsaPublicKey&&) = delete;
|
||||
|
||||
private:
|
||||
RsaPublicKey() {}
|
||||
RsaPublicKey() = default;
|
||||
|
||||
// Initializes the public key object using the provided |buffer|.
|
||||
// In case of any failure, false is return and the key should be
|
||||
@@ -222,6 +219,9 @@ class RsaPublicKey {
|
||||
|
||||
class RsaPrivateKey {
|
||||
public:
|
||||
~RsaPrivateKey();
|
||||
WVCDM_DISALLOW_COPY_AND_MOVE(RsaPrivateKey);
|
||||
|
||||
// Creates a new, pseudorandom RSA private key.
|
||||
static std::unique_ptr<RsaPrivateKey> New(RsaFieldSize field_size);
|
||||
|
||||
@@ -342,15 +342,8 @@ class RsaPrivateKey {
|
||||
std::vector<uint8_t> DecryptEncryptionKey(
|
||||
const std::string& enc_encryption_key) const;
|
||||
|
||||
~RsaPrivateKey();
|
||||
|
||||
RsaPrivateKey(const RsaPrivateKey&) = delete;
|
||||
RsaPrivateKey(RsaPrivateKey&&) = delete;
|
||||
const RsaPrivateKey& operator=(const RsaPrivateKey&) = delete;
|
||||
RsaPrivateKey& operator=(RsaPrivateKey&&) = delete;
|
||||
|
||||
private:
|
||||
RsaPrivateKey() {}
|
||||
RsaPrivateKey() = default;
|
||||
|
||||
// Initializes the public key object using the provided |buffer|.
|
||||
// In case of any failure, false is return and the key should be
|
||||
|
||||
Reference in New Issue
Block a user