You are here

public static function AESEncryption::encrypt_data in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

*

Parameters

string $data - the key=value pairs separated with & : * @return string

File

includes/encryption.php, line 17

Class

AESEncryption
@package miniOrange @author miniOrange Security Software Pvt. Ltd. @license GNU/GPLv3 @copyright Copyright 2015 miniOrange. All Rights Reserved.

Code

public static function encrypt_data($data, $key) {
  $strIn = AESEncryption::pkcs5_pad($data);
  $strCrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $strIn, MCRYPT_MODE_ECB);
  return base64_encode($strCrypt);
}