gdcmOpenSSLP7CryptographicMessageSyntax.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMOPENSSLP7CRYPTOGRAPHICMESSAGESYNTAX_H
#define GDCMOPENSSLP7CRYPTOGRAPHICMESSAGESYNTAX_H
#include "gdcmCryptographicMessageSyntax.h"
#include "gdcmTypes.h"
namespace gdcm
{
class CryptographicMessageSyntaxInternals;
//-----------------------------------------------------------------------------
class GDCM_EXPORT OpenSSLP7CryptographicMessageSyntax : public CryptographicMessageSyntax
{
public:
OpenSSLP7CryptographicMessageSyntax();
~OpenSSLP7CryptographicMessageSyntax();
// X.509
bool ParseCertificateFile( const char *filename );
bool ParseKeyFile( const char *filename );
// PBE
bool SetPassword(const char * /*pass*/, size_t /*passLen*/)
{
gdcmWarningMacro( "Openssl using PKCS7 does not support Password Based Encryption." );
return false;
}
void SetCipherType(CipherTypes type);
CipherTypes GetCipherType() const;
bool Encrypt(char *output, size_t &outlen, const char *array, size_t len) const;
bool Decrypt(char *output, size_t &outlen, const char *array, size_t len) const;
private:
CryptographicMessageSyntaxInternals *Internals;
private:
OpenSSLP7CryptographicMessageSyntax(const OpenSSLP7CryptographicMessageSyntax&); // Not implemented.
void operator=(const OpenSSLP7CryptographicMessageSyntax&); // Not implemented.
};
} // end namespace gdcm
//-----------------------------------------------------------------------------
#endif //GDCMOPENSSLP7CRYPTOGRAPHICMESSAGESYNTAX_H
gdcm::CryptographicMessageSyntax::CipherTypes
CipherTypes
Definition gdcmCryptographicMessageSyntax.h:31
gdcm::CryptographicMessageSyntax::CryptographicMessageSyntax
CryptographicMessageSyntax()=default
gdcm::OpenSSLP7CryptographicMessageSyntax::Encrypt
bool Encrypt(char *output, size_t &outlen, const char *array, size_t len) const
create a PKCS#7 envelopedData structure
gdcm::OpenSSLP7CryptographicMessageSyntax::ParseKeyFile
bool ParseKeyFile(const char *filename)
gdcm::OpenSSLP7CryptographicMessageSyntax::Decrypt
bool Decrypt(char *output, size_t &outlen, const char *array, size_t len) const
decrypt content from a PKCS#7 envelopedData structure
gdcm::OpenSSLP7CryptographicMessageSyntax::~OpenSSLP7CryptographicMessageSyntax
~OpenSSLP7CryptographicMessageSyntax()
gdcm::OpenSSLP7CryptographicMessageSyntax::ParseCertificateFile
bool ParseCertificateFile(const char *filename)
gdcm::OpenSSLP7CryptographicMessageSyntax::GetCipherType
CipherTypes GetCipherType() const
gdcm::OpenSSLP7CryptographicMessageSyntax::SetPassword
bool SetPassword(const char *, size_t)
Definition gdcmOpenSSLP7CryptographicMessageSyntax.h:45
gdcm::OpenSSLP7CryptographicMessageSyntax::OpenSSLP7CryptographicMessageSyntax
OpenSSLP7CryptographicMessageSyntax()
gdcm::OpenSSLP7CryptographicMessageSyntax::SetCipherType
void SetCipherType(CipherTypes type)
gdcmCryptographicMessageSyntax.h
gdcmWarningMacro
#define gdcmWarningMacro(msg)
Warning.
Definition gdcmTrace.h:142
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21