GDCM  2.4.5
gdcmOpenSSLP7CryptographicMessageSyntax.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 GDCMOPENSSLP7CRYPTOGRAPHICMESSAGESYNTAX_H
15 #define GDCMOPENSSLP7CRYPTOGRAPHICMESSAGESYNTAX_H
16 
18 #include "gdcmTypes.h"
19 
20 namespace gdcm
21 {
22 class CryptographicMessageSyntaxInternals;
23 //-----------------------------------------------------------------------------
24 
35 {
36 public:
39 
40  // X.509
41  bool ParseCertificateFile( const char *filename );
42  bool ParseKeyFile( const char *filename );
43 
44  // PBE
45  bool SetPassword(const char * /*pass*/, size_t /*passLen*/)
46  {
47  gdcmWarningMacro( "Openssl using PKCS7 does not support Password Based Encryption." );
48  return false;
49  }
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:
66  void operator=(const OpenSSLP7CryptographicMessageSyntax&); // Not implemented.
67 };
68 } // end namespace gdcm
69 //-----------------------------------------------------------------------------
70 #endif //GDCMOPENSSLP7CRYPTOGRAPHICMESSAGESYNTAX_H
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
#define gdcmWarningMacro(msg)
Warning.
Definition: gdcmTrace.h:141
bool SetPassword(const char *, size_t)
Definition: gdcmOpenSSLP7CryptographicMessageSyntax.h:45
Class for CryptographicMessageSyntax encryption. This is just a simple wrapper around openssl PKCS7_e...
Definition: gdcmOpenSSLP7CryptographicMessageSyntax.h:34
Definition: gdcmCryptographicMessageSyntax.h:22
Definition: gdcmASN1.h:20

Generated on Fri Sep 25 2015 17:58:23 for GDCM by doxygen 1.8.9.1
SourceForge.net Logo