You are here

public function XMLSecurityKey::encryptData in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8

Encrypts the given data (string) using the regarding php-extension, depending on the library assigned to algorithm in the contructor.

Parameters

string $data:

Return value

mixed|string

File

src/XMLSecurityKey.php, line 508

Class

XMLSecurityKey

Namespace

Drupal\miniorange_saml

Code

public function encryptData($data) {
  switch ($this->cryptParams['library']) {
    case 'mcrypt':
      return $this
        ->encryptMcrypt($data);
    case 'openssl':
      return $this
        ->encryptOpenSSL($data);
  }
}