Replace hardcoded parameters
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include <string>
|
||||
|
||||
#include <cstdint>
|
||||
#include "base/macros.h"
|
||||
#include "openssl/rsa.h"
|
||||
|
||||
namespace widevine {
|
||||
@@ -79,7 +78,13 @@ class RsaPrivateKey {
|
||||
class RsaPublicKey {
|
||||
public:
|
||||
explicit RsaPublicKey(RSA* key);
|
||||
RsaPublicKey(const RsaPublicKey&);
|
||||
|
||||
// Copy constructor.
|
||||
RsaPublicKey(const RsaPublicKey& rsa_key);
|
||||
|
||||
// Construct RsaPublicKey object from RsaPrivateKey.
|
||||
explicit RsaPublicKey(const RsaPrivateKey& rsa_key);
|
||||
|
||||
virtual ~RsaPublicKey();
|
||||
|
||||
// Create an RsaPublicKey object using a DER encoded PKCS#1 RSAPublicKey.
|
||||
@@ -132,6 +137,10 @@ class RsaPublicKey {
|
||||
class RsaKeyFactory {
|
||||
public:
|
||||
RsaKeyFactory();
|
||||
|
||||
RsaKeyFactory(const RsaKeyFactory&) = delete;
|
||||
RsaKeyFactory& operator=(const RsaKeyFactory&) = delete;
|
||||
|
||||
virtual ~RsaKeyFactory();
|
||||
|
||||
// Create an RsaPrivateKey object using a DER encoded PKCS#1 RSAPrivateKey.
|
||||
@@ -141,14 +150,12 @@ class RsaKeyFactory {
|
||||
// Create a PKCS#1 RsaPrivateKey object using an PKCS#8 PrivateKeyInfo or
|
||||
// EncryptedPrivateKeyInfo (if |private_key_passprhase| is not empty).
|
||||
virtual std::unique_ptr<RsaPrivateKey> CreateFromPkcs8PrivateKey(
|
||||
const std::string& private_key, const std::string& private_key_passphrase) const;
|
||||
const std::string& private_key,
|
||||
const std::string& private_key_passphrase) const;
|
||||
|
||||
// Create an RsaPublicKey object using a DER encoded PKCS#1 RSAPublicKey.
|
||||
virtual std::unique_ptr<RsaPublicKey> CreateFromPkcs1PublicKey(
|
||||
const std::string& public_key) const;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(RsaKeyFactory);
|
||||
};
|
||||
|
||||
} // namespace widevine
|
||||
|
||||
Reference in New Issue
Block a user