public static function Utilities::getEncryptionAlgorithm in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7
1 call to Utilities::getEncryptionAlgorithm()
- SAML2_Assertion::__construct in includes/
Assertion.php
File
- includes/
Utilities.php, line 1285
Class
- Utilities
- This file is part of miniOrange SAML plugin.
Code
public static function getEncryptionAlgorithm($method) {
switch ($method) {
case 'http://www.w3.org/2001/04/xmlenc#tripledes-cbc':
return XMLSecurityKey::TRIPLEDES_CBC;
break;
case 'http://www.w3.org/2001/04/xmlenc#aes128-cbc':
return XMLSecurityKey::AES128_CBC;
case 'http://www.w3.org/2001/04/xmlenc#aes192-cbc':
return XMLSecurityKey::AES192_CBC;
break;
case 'http://www.w3.org/2001/04/xmlenc#aes256-cbc':
return XMLSecurityKey::AES256_CBC;
break;
case 'http://www.w3.org/2001/04/xmlenc#rsa-1_5':
return XMLSecurityKey::RSA_1_5;
break;
case 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p':
return XMLSecurityKey::RSA_OAEP_MGF1P;
break;
case 'http://www.w3.org/2000/09/xmldsig#dsa-sha1':
return XMLSecurityKey::DSA_SHA1;
break;
case 'http://www.w3.org/2000/09/xmldsig#rsa-sha1':
return XMLSecurityKey::RSA_SHA1;
break;
case 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256':
return XMLSecurityKey::RSA_SHA256;
break;
case 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384':
return XMLSecurityKey::RSA_SHA384;
break;
case 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512':
return XMLSecurityKey::RSA_SHA512;
break;
default:
echo sprintf('Invalid Encryption Method: ' . $method);
exit;
break;
}
}