/*
- * Copyright 2001-2005 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <saml/saml1/binding/SAMLArtifactType0001.h>
#include <saml/saml1/binding/SAMLArtifactType0002.h>
#include <saml/saml2/binding/SAML2ArtifactType0004.h>
+#include <xmltooling/security/SecurityHelper.h>
using namespace opensaml::saml1p;
using namespace opensaml::saml2p;
SAMLArtifactType0001 artifact1(sourceId,handle);
//printResults(artifact1);
- SAMLArtifactType0001 artifact2(conf.hashSHA1(providerIdStr.c_str()),handle);
+ SAMLArtifactType0001 artifact2(
+ SecurityHelper::doHash("SHA1", providerIdStr.data(), providerIdStr.length(), false), handle
+ );
//printResults(artifact2,providerIdStr.c_str());
}
}
void testSAMLArtifactType0004(void) {
- SAML2ArtifactType0004 artifact(SAMLConfig::getConfig().hashSHA1(providerIdStr.c_str()),666,handle);
+ SAML2ArtifactType0004 artifact(
+ SecurityHelper::doHash("SHA1", providerIdStr.data(), providerIdStr.length(), false), 666, handle
+ );
//printResults(artifact,providerIdStr.c_str());
}
- void printResults(SAMLArtifact& artifact, const char* str=NULL) {
+ void printResults(SAMLArtifact& artifact, const char* str=nullptr) {
// print heading:
cout << "Artifact Type " << SAMLArtifact::toHex(artifact.getTypeCode());
cout << " (size = " << artifact.getBytes().size() << ")" << endl;