GDCM  2.2.6
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 class CryptographicMessageSyntaxInternals;
22 //-----------------------------------------------------------------------------
23 
34 {
35 public :
38 
39  // X.509
40  bool ParseCertificateFile( const char *filename );
41  bool ParseKeyFile( const char *filename );
42 
43  typedef enum {
44  DES_CIPHER, // DES
45  DES3_CIPHER, // Triple DES
46  AES128_CIPHER, // CBC AES
47  AES192_CIPHER, // ' '
48  AES256_CIPHER // ' '
49  } CipherTypes;
50 
53  void SetCipherType(CipherTypes type);
54  CipherTypes GetCipherType() const;
55 
57  bool Encrypt(char *output, size_t &outlen, const char *array, size_t len) const;
58 
60  bool Decrypt(char *output, size_t &outlen, const char *array, size_t len) const;
61 
62 private:
63  CryptographicMessageSyntaxInternals *Internals;
64 private:
65  CryptographicMessageSyntax(const CryptographicMessageSyntax&); // Not implemented.
66  void operator=(const CryptographicMessageSyntax&); // Not implemented.
67 };
68 } // end namespace gdcm
69 //-----------------------------------------------------------------------------
70 #endif //GDCMCRYPTOGRAPHICMESSAGESYNTAX_H
Definition: gdcmCryptographicMessageSyntax.h:44
Definition: gdcmCryptographicMessageSyntax.h:45
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
Definition: gdcmCryptographicMessageSyntax.h:46
Definition: gdcmCryptographicMessageSyntax.h:47
Class for CryptographicMessageSyntax encryption. This is just a simple wrapper around openssl PKCS7_e...
Definition: gdcmCryptographicMessageSyntax.h:33

Generated on Sat Dec 21 2013 05:56:16 for GDCM by doxygen 1.8.5
SourceForge.net Logo