Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::Crypto::KeyPairImpl Class Referenceabstract

Class KeyPairImpl. More...

#include <KeyPairImpl.h>

+ Inheritance diagram for Poco::Crypto::KeyPairImpl:
+ Collaboration diagram for Poco::Crypto::KeyPairImpl:

Public Types

enum  Type { KT_RSA_IMPL = 0 , KT_EC_IMPL }
 
using Ptr = Poco::AutoPtr<KeyPairImpl>
 
using ByteVec = std::vector<unsigned char>
 

Public Member Functions

 KeyPairImpl (const std::string &name, Type type)
 
virtual ~KeyPairImpl ()
 Create KeyPairImpl with specified type and name.
 
virtual int size () const =0
 Destroys the KeyPairImpl.
 
virtual void save (const std::string &publicKeyFile, const std::string &privateKeyFile="", const std::string &privateKeyPassphrase="") const =0
 Returns the key size.
 
virtual void save (std::ostream *pPublicKeyStream, std::ostream *pPrivateKeyStream=0, const std::string &privateKeyPassphrase="") const =0
 
const std::string & name () const
 
Type type () const
 Returns key pair name.
 
- Public Member Functions inherited from Poco::RefCountedObject
 RefCountedObject ()
 
void duplicate () const
 
void release () const noexcept
 Increments the object's reference count.
 
int referenceCount () const
 

Private Member Functions

 KeyPairImpl ()
 Returns key pair type.
 

Private Attributes

std::string _name
 
Type _type
 
OpenSSLInitializer _openSSLInitializer
 

Additional Inherited Members

- Protected Member Functions inherited from Poco::RefCountedObject
virtual ~RefCountedObject ()
 Returns the reference count.
 

Detailed Description

Class KeyPairImpl.

Definition at line 34 of file KeyPairImpl.h.

Member Typedef Documentation

◆ ByteVec

using Poco::Crypto::KeyPairImpl::ByteVec = std::vector<unsigned char>

Definition at line 45 of file KeyPairImpl.h.

◆ Ptr

Member Enumeration Documentation

◆ Type

Enumerator
KT_RSA_IMPL 
KT_EC_IMPL 

Definition at line 38 of file KeyPairImpl.h.

Constructor & Destructor Documentation

◆ KeyPairImpl() [1/2]

Poco::Crypto::KeyPairImpl::KeyPairImpl ( const std::string & name,
Type type )

◆ ~KeyPairImpl()

virtual Poco::Crypto::KeyPairImpl::~KeyPairImpl ( )
virtual

Create KeyPairImpl with specified type and name.

◆ KeyPairImpl() [2/2]

Poco::Crypto::KeyPairImpl::KeyPairImpl ( )
private

Returns key pair type.

Member Function Documentation

◆ name()

const std::string & Poco::Crypto::KeyPairImpl::name ( ) const
inline

Exports the public and private key to the given streams.

If a null pointer is passed for a stream, the corresponding key is not exported.

Definition at line 92 of file KeyPairImpl.h.

+ Here is the caller graph for this function:

◆ save() [1/2]

virtual void Poco::Crypto::KeyPairImpl::save ( const std::string & publicKeyFile,
const std::string & privateKeyFile = "",
const std::string & privateKeyPassphrase = "" ) const
pure virtual

Returns the key size.

Implemented in Poco::Crypto::RSAKeyImpl.

◆ save() [2/2]

virtual void Poco::Crypto::KeyPairImpl::save ( std::ostream * pPublicKeyStream,
std::ostream * pPrivateKeyStream = 0,
const std::string & privateKeyPassphrase = "" ) const
pure virtual

Exports the public and private keys to the given files.

If an empty filename is specified, the corresponding key is not exported.

Implemented in Poco::Crypto::RSAKeyImpl.

◆ size()

virtual int Poco::Crypto::KeyPairImpl::size ( ) const
pure virtual

Destroys the KeyPairImpl.

Implemented in Poco::Crypto::RSAKeyImpl.

+ Here is the caller graph for this function:

◆ type()

KeyPairImpl::Type Poco::Crypto::KeyPairImpl::type ( ) const
inline

Returns key pair name.

Definition at line 98 of file KeyPairImpl.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _name

std::string Poco::Crypto::KeyPairImpl::_name
private

Definition at line 81 of file KeyPairImpl.h.

◆ _openSSLInitializer

OpenSSLInitializer Poco::Crypto::KeyPairImpl::_openSSLInitializer
private

Definition at line 83 of file KeyPairImpl.h.

◆ _type

Type Poco::Crypto::KeyPairImpl::_type
private

Definition at line 82 of file KeyPairImpl.h.


The documentation for this class was generated from the following file: