1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace SimpleSAML\XMLSecurity\XML\xenc11; |
||
6 | |||
7 | use DOMElement; |
||
8 | use SimpleSAML\Assert\Assert; |
||
9 | use SimpleSAML\XML\Exception\InvalidDOMElementException; |
||
10 | |||
11 | /** |
||
12 | * A class implementing the xenc11:PRF element. |
||
13 | * |
||
14 | * @package simplesamlphp/xml-security |
||
15 | */ |
||
16 | final class PRF extends AbstractPRFAlgorithmIdentifierType |
||
17 | { |
||
18 | /** |
||
19 | * @inheritDoc |
||
20 | * |
||
21 | * @throws \SimpleSAML\XML\Exception\InvalidDOMElementException |
||
22 | * If the qualified name of the supplied element is wrong |
||
23 | */ |
||
24 | public static function fromXML(DOMElement $xml): static |
||
25 | { |
||
26 | Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); |
||
27 | Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class); |
||
28 | |||
29 | return new static( |
||
30 | self::getOptionalAttribute($xml, 'Algorithm', null), |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
31 | ); |
||
32 | } |
||
33 | } |
||
34 |