You are here

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

Signs the data (string) using the extension assigned to the type in the constructor.

Parameters

string $data:

Return value

mixed|string

File

includes/XMLSecurityKey.php, line 573

Class

XMLSecurityKey

Code

public function signData($data) {
  switch ($this->cryptParams['library']) {
    case 'openssl':
      return $this
        ->signOpenSSL($data);
    case self::HMAC_SHA1:
      return hash_hmac("sha1", $data, $this->key, true);
  }
}