Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GDCMCRYPTOGRAPHICMESSAGESYNTAX_H
00016 #define GDCMCRYPTOGRAPHICMESSAGESYNTAX_H
00017
00018 #include "gdcmTypes.h"
00019
00020 namespace gdcm
00021 {
00022 class CryptographicMessageSyntaxInternals;
00023
00024
00034 class GDCM_EXPORT CryptographicMessageSyntax
00035 {
00036 public :
00037 CryptographicMessageSyntax();
00038 ~CryptographicMessageSyntax();
00039
00040
00041 bool ParseCertificateFile( const char *filename );
00042 bool ParseKeyFile( const char *filename );
00043
00044 typedef enum {
00045 DES_CIPHER,
00046 DES3_CIPHER,
00047 AES128_CIPHER,
00048 AES192_CIPHER,
00049 AES256_CIPHER
00050 } CipherTypes;
00051
00054 void SetCipherType(CipherTypes type);
00055 CipherTypes GetCipherType() const;
00056
00058 bool Encrypt(char *output, size_t &outlen, const char *array, size_t len) const;
00059
00061 bool Decrypt(char *output, size_t &outlen, const char *array, size_t len) const;
00062
00063 private:
00064 CryptographicMessageSyntaxInternals *Internals;
00065 private:
00066 CryptographicMessageSyntax(const CryptographicMessageSyntax&);
00067 void operator=(const CryptographicMessageSyntax&);
00068 };
00069 }
00070
00071 #endif //GDCMCRYPTOGRAPHICMESSAGESYNTAX_H