# Poco::Crypto

# class RSACipherImpl

Library: Crypto
Package: RSA
Header: Poco/Crypto/RSACipherImpl.h

## Description

An implementation of the Cipher class for asymmetric (public-private key) encryption based on the the RSA algorithm in OpenSSL's crypto library.

Encryption is using the public key, decryption requires the private key.

## Inheritance

Direct Base Classes: Cipher

All Base Classes: Cipher, Poco::RefCountedObject

## Member Summary

Member Functions: createDecryptor, createEncryptor, name

Inherited Functions: createDecryptor, createEncryptor, decrypt, decryptString, duplicate, encrypt, encryptString, name, referenceCount, release

## Constructors

### RSACipherImpl

RSACipherImpl(
const RSAKey & key,
RSAPaddingMode paddingMode
);

Creates a new RSACipherImpl object for the given RSAKey and using the given padding mode.

## Destructor

### ~RSACipherImpl

virtual ~RSACipherImpl();

Destroys the RSACipherImpl.

## Member Functions

### createDecryptor

CryptoTransform::Ptr createDecryptor();

Creates a decryptor object.

See also: Poco::Crypto::Cipher::createDecryptor()

### createEncryptor

CryptoTransform::Ptr createEncryptor();

Creates an encryptor object.

See also: Poco::Crypto::Cipher::createEncryptor()

### name

const std::string & name() const;

Returns the name of the Cipher.

See also: Poco::Crypto::Cipher::name()