GDCM 3.0.24
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
20namespace gdcm
21{
22class CryptographicMessageSyntaxInternals;
23//-----------------------------------------------------------------------------
24
35{
36public:
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
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
62private:
63 CryptographicMessageSyntaxInternals *Internals;
64private:
66 void operator=(const OpenSSLP7CryptographicMessageSyntax&); // Not implemented.
67};
68} // end namespace gdcm
69//-----------------------------------------------------------------------------
70#endif //GDCMOPENSSLP7CRYPTOGRAPHICMESSAGESYNTAX_H
Definition gdcmCryptographicMessageSyntax.h:23
CipherTypes
Definition gdcmCryptographicMessageSyntax.h:31
Definition gdcmOpenSSLP7CryptographicMessageSyntax.h:35
bool Encrypt(char *output, size_t &outlen, const char *array, size_t len) const
create a PKCS#7 envelopedData structure
bool ParseKeyFile(const char *filename)
bool Decrypt(char *output, size_t &outlen, const char *array, size_t len) const
decrypt content from a PKCS#7 envelopedData structure
bool ParseCertificateFile(const char *filename)
bool SetPassword(const char *, size_t)
Definition gdcmOpenSSLP7CryptographicMessageSyntax.h:45
#define gdcmWarningMacro(msg)
Warning.
Definition gdcmTrace.h:142
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21