Files
poco/Crypto_Win/include/Poco/Crypto/CipherImpl.h
2015-02-04 19:37:48 +01:00

69 lines
1.1 KiB
C++

//
// CipherImpl.h
//
// $Id$
//
// Library: Crypto_Win
// Package: Cipher
// Module: CipherImpl
//
// Definition of the CipherImpl class.
//
// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Crypto_CipherImpl_INCLUDED
#define Crypto_CipherImpl_INCLUDED
#include "Poco/Crypto/Crypto.h"
#include "Poco/Crypto/Cipher.h"
#include "Poco/Crypto/CipherKey.h"
namespace Poco {
namespace Crypto {
class CipherImpl: public Cipher
/// An implementation of the Cipher class for WinCrypt.
{
public:
CipherImpl(const CipherKey& key);
/// Creates a new CipherImpl object for the given CipherKey.
virtual ~CipherImpl();
/// Destroys the CipherImpl.
const std::string& name() const;
/// Returns the name of the cipher.
CryptoTransform* createEncryptor();
/// Creates an encryptor object.
CryptoTransform* createDecryptor();
/// Creates a decryptor object.
private:
CipherKey _key;
};
//
// Inlines
//
inline const std::string& CipherImpl::name() const
{
return _key.name();
}
} } // namespace Poco::Crypto
#endif // Crypto_CipherImpl_INCLUDED