ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Fingerprint.php
Go to the documentation of this file.
1<?php
2
3namespace 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}
An exception for terminatinating execution or to throw for unit testing.
Simple representation of the fingerprint of a certificate.
Definition: Fingerprint.php:13
equals(Fingerprint $fingerprint)
Definition: Fingerprint.php:56
getRaw()
Get the raw, unmodified fingerprint value.
Definition: Fingerprint.php:38