GDCM 3.2.1

gdcmCryptographicMessageSyntax.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14#ifndef GDCMCRYPTOGRAPHICMESSAGESYNTAX_H
15#define GDCMCRYPTOGRAPHICMESSAGESYNTAX_H
16
17#include "gdcmTypes.h"
18
19 namespace gdcm
20{
21
22 class GDCM_EXPORT CryptographicMessageSyntax
23{
24 public:
25 CryptographicMessageSyntax() = default;
26
27 virtual ~CryptographicMessageSyntax() = default;
28 CryptographicMessageSyntax(const CryptographicMessageSyntax&) = delete;
29 void operator=(const CryptographicMessageSyntax&) = delete;
30
31 typedef enum {
32 DES3_CIPHER, // Triple DES
33 AES128_CIPHER, // CBC AES
34 AES192_CIPHER, // ' '
35 AES256_CIPHER // ' '
36 } CipherTypes;
37
38 // X.509
39 virtual bool ParseCertificateFile( const char *filename ) = 0;
40 virtual bool ParseKeyFile( const char *filename ) = 0;
41
42 // PBE
43 virtual bool SetPassword(const char * pass, size_t passLen) = 0;
44
46 virtual bool Encrypt(char *output, size_t &outlen, const char *array, size_t len) const = 0;
48 virtual bool Decrypt(char *output, size_t &outlen, const char *array, size_t len) const = 0;
49
50 virtual void SetCipherType(CipherTypes type) = 0;
51
52 virtual CipherTypes GetCipherType() const = 0;
53};
54
55} // end namespace gdcm
56
57#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