X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=blobdiff_plain;f=xmltooling%2Fencryption%2Fimpl%2FEncrypter.cpp;h=a6996c08e22f9fc49685003879b45488b9ebc68f;hp=21601b8d90512af22e54b543cba86868cd4cd655;hb=bd026f07e729e66127b3efd48aee443fba815af3;hpb=6bf08ad666ef628116800af401e2b058bc67554f diff --git a/xmltooling/encryption/impl/Encrypter.cpp b/xmltooling/encryption/impl/Encrypter.cpp index 21601b8..a6996c0 100644 --- a/xmltooling/encryption/impl/Encrypter.cpp +++ b/xmltooling/encryption/impl/Encrypter.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,12 +22,15 @@ #include "internal.h" #include "encryption/Encrypter.h" +#include "encryption/Encryption.h" #include "security/Credential.h" +#include "signature/KeyInfo.h" #include #include #include #include +#include #include #include @@ -37,6 +40,29 @@ using namespace xmltooling; using namespace xercesc; using namespace std; +Encrypter::EncryptionParams::EncryptionParams( + const XMLCh* algorithm, const unsigned char* keyBuffer, unsigned int keyBufferSize, const Credential* credential, bool compact + ) : m_algorithm(algorithm), m_keyBuffer(keyBuffer), m_keyBufferSize(keyBufferSize), m_credential(credential), m_compact(compact) +{ +} + +Encrypter::EncryptionParams::~EncryptionParams() +{ +} + +Encrypter::KeyEncryptionParams::KeyEncryptionParams(const Credential& credential, const XMLCh* algorithm, const XMLCh* recipient) + : m_credential(credential), m_algorithm(algorithm), m_recipient(recipient) +{ +} + +Encrypter::KeyEncryptionParams::~KeyEncryptionParams() +{ +} + +Encrypter::Encrypter() : m_cipher(NULL) +{ +} + Encrypter::~Encrypter() { XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher);