ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Fingerprint.php
Go to the documentation of this file.
1 <?php
2 
3 namespace SAML2\Certificate;
4 
6 
13 {
17  private $contents;
18 
24  public function __construct($fingerPrint)
25  {
26  if (!is_string($fingerPrint)) {
27  throw InvalidArgumentException::invalidType('string', $fingerPrint);
28  }
29 
30  $this->contents = $fingerPrint;
31  }
32 
38  public function getRaw()
39  {
40  return $this->contents;
41  }
42 
46  public function getNormalized()
47  {
48  return strtolower(str_replace(':', '', $this->contents));
49  }
50 
56  public function equals(Fingerprint $fingerprint)
57  {
58  return $this->getNormalized() === $fingerprint->getNormalized();
59  }
60 }
equals(Fingerprint $fingerprint)
Definition: Fingerprint.php:56
getRaw()
Get the raw, unmodified fingerprint value.
Definition: Fingerprint.php:38
Simple representation of the fingerprint of a certificate.
Definition: Fingerprint.php:12