gdcmCryptographicMessageSyntax.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 GDCMCRYPTOGRAPHICMESSAGESYNTAX_H
#define GDCMCRYPTOGRAPHICMESSAGESYNTAX_H
#include "gdcmTypes.h"
namespace gdcm
{
class GDCM_EXPORT CryptographicMessageSyntax
{
public:
CryptographicMessageSyntax() = default;
virtual ~CryptographicMessageSyntax() = default;
CryptographicMessageSyntax(const CryptographicMessageSyntax&) = delete;
void operator=(const CryptographicMessageSyntax&) = delete;
typedef enum {
DES3_CIPHER, // Triple DES
AES128_CIPHER, // CBC AES
AES192_CIPHER, // ' '
AES256_CIPHER // ' '
} CipherTypes;
// X.509
virtual bool ParseCertificateFile( const char *filename ) = 0;
virtual bool ParseKeyFile( const char *filename ) = 0;
// PBE
virtual bool SetPassword(const char * pass, size_t passLen) = 0;
virtual bool Encrypt(char *output, size_t &outlen, const char *array, size_t len) const = 0;
virtual bool Decrypt(char *output, size_t &outlen, const char *array, size_t len) const = 0;
virtual void SetCipherType(CipherTypes type) = 0;
virtual CipherTypes GetCipherType() const = 0;
};
} // end namespace gdcm
#endif //GDCMCRYPTOGRAPHICMESSAGESYNTAX_H
gdcm::CryptographicMessageSyntax::~CryptographicMessageSyntax
virtual ~CryptographicMessageSyntax()=default
gdcm::CryptographicMessageSyntax::SetCipherType
virtual void SetCipherType(CipherTypes type)=0
gdcm::CryptographicMessageSyntax::ParseKeyFile
virtual bool ParseKeyFile(const char *filename)=0
gdcm::CryptographicMessageSyntax::ParseCertificateFile
virtual bool ParseCertificateFile(const char *filename)=0
gdcm::CryptographicMessageSyntax::SetPassword
virtual bool SetPassword(const char *pass, size_t passLen)=0
gdcm::CryptographicMessageSyntax::CipherTypes
CipherTypes
Definition gdcmCryptographicMessageSyntax.h:31
gdcm::CryptographicMessageSyntax::AES192_CIPHER
@ AES192_CIPHER
Definition gdcmCryptographicMessageSyntax.h:34
gdcm::CryptographicMessageSyntax::AES256_CIPHER
@ AES256_CIPHER
Definition gdcmCryptographicMessageSyntax.h:35
gdcm::CryptographicMessageSyntax::AES128_CIPHER
@ AES128_CIPHER
Definition gdcmCryptographicMessageSyntax.h:33
gdcm::CryptographicMessageSyntax::DES3_CIPHER
@ DES3_CIPHER
Definition gdcmCryptographicMessageSyntax.h:32
gdcm::CryptographicMessageSyntax::CryptographicMessageSyntax
CryptographicMessageSyntax(const CryptographicMessageSyntax &)=delete
gdcm::CryptographicMessageSyntax::operator=
void operator=(const CryptographicMessageSyntax &)=delete
gdcm::CryptographicMessageSyntax::Encrypt
virtual bool Encrypt(char *output, size_t &outlen, const char *array, size_t len) const =0
create a CMS envelopedData structure
gdcm::CryptographicMessageSyntax::Decrypt
virtual bool Decrypt(char *output, size_t &outlen, const char *array, size_t len) const =0
decrypt content from a CMS envelopedData structure
gdcm::CryptographicMessageSyntax::GetCipherType
virtual CipherTypes GetCipherType() const =0
gdcm::CryptographicMessageSyntax::CryptographicMessageSyntax
CryptographicMessageSyntax()=default
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21