Example #1
0
 /**
  * Encrypt data using AES and the system-wide secret salt as key.
  *
  * @param string $data The data to encrypt.
  *
  * @return string The encrypted data and IV.
  * @throws \InvalidArgumentException If $data is not a string.
  * @throws \SimpleSAML_Error_Exception If the mcrypt module is not loaded.
  *
  * @author Andreas Solberg, UNINETT AS <*****@*****.**>
  * @author Jaime Perez, UNINETT AS <*****@*****.**>
  */
 public static function aesEncrypt($data)
 {
     return self::_aesEncrypt($data, Config::getSecretSalt());
 }