Lines Matching refs:key

236      * @param string  $key   A private key
242 public static function formatPrivateKey($key, $heads = true) argument
244 $key = str_replace(array("\x0D", "\r", "\n"), "", $key);
245 if (!empty($key)) {
246 if (strpos($key, '-----BEGIN PRIVATE KEY-----') !== false) {
247 …$key = OneLogin_Saml2_Utils::getStringBetween($key, '-----BEGIN PRIVATE KEY-----', '-----END PRIVA…
248 $key = str_replace(' ', '', $key);
251 … $key = "-----BEGIN PRIVATE KEY-----\n".chunk_split($key, 64, "\n")."-----END PRIVATE KEY-----\n";
253 } else if (strpos($key, '-----BEGIN RSA PRIVATE KEY-----') !== false) {
254 …$key = OneLogin_Saml2_Utils::getStringBetween($key, '-----BEGIN RSA PRIVATE KEY-----', '-----END R…
255 $key = str_replace(' ', '', $key);
258 …$key = "-----BEGIN RSA PRIVATE KEY-----\n".chunk_split($key, 64, "\n")."-----END RSA PRIVATE KEY--…
261 $key = str_replace(' ', '', $key);
264 …$key = "-----BEGIN RSA PRIVATE KEY-----\n".chunk_split($key, 64, "\n")."-----END RSA PRIVATE KEY--…
268 return $key;
1204 $symmetricKeyInfo->key = $inputKey->key;
1214 $key = $encKey->decryptKey($symmetricKeyInfo);
1215 if (strlen($key) != $keySize) {
1217 $pkey = openssl_pkey_get_details($symmetricKeyInfo->key);
1219 $key = sha1($encryptedKey . $pkey, true);
1222 if (strlen($key) > $keySize) {
1223 $key = substr($key, 0, $keySize);
1224 } elseif (strlen($key) < $keySize) {
1225 $key = str_pad($key, $keySize);
1228 $symmetricKey->loadKey($key);
1272 * @param XMLSecurityKey $key The key.
1280 public static function castKey(XMLSecurityKey $key, $algorithm, $type = 'public') argument
1285 if ($key->type === $algorithm) {
1286 return $key;
1293 $keyInfo = openssl_pkey_get_details($key->key);
1328 * @param string $key The private key
1337 …public static function addSign($xml, $key, $cert, $signAlgorithm = XMLSecurityKey::RSA_SHA1, $dige… argument
1351 $objKey->loadKey($key, false);
1432 throw new Exception('We have no idea about the key');