88use DOMNode ;
99use SimpleSAML \Assert \Assert ;
1010use SimpleSAML \XMLSecurity \Alg \SignatureAlgorithm ;
11- use SimpleSAML \XMLSecurity \Constants ;
11+ use SimpleSAML \XMLSecurity \Constants as C ;
1212use SimpleSAML \XMLSecurity \Exception \InvalidArgumentException ;
1313use SimpleSAML \XMLSecurity \Exception \RuntimeException ;
1414use SimpleSAML \XMLSecurity \Utils \Security ;
@@ -38,7 +38,7 @@ trait SignableElementTrait
3838 protected ?Signature $ signature = null ;
3939
4040 /** @var string */
41- private string $ c14nAlg = Constants ::C14N_EXCLUSIVE_WITHOUT_COMMENTS ;
41+ private string $ c14nAlg = C ::C14N_EXCLUSIVE_WITHOUT_COMMENTS ;
4242
4343 /** @var \SimpleSAML\XMLSecurity\XML\ds\KeyInfo|null */
4444 private ?KeyInfo $ keyInfo = null ;
@@ -68,18 +68,18 @@ abstract public function getId(): ?string;
6868 */
6969 public function sign (
7070 SignatureAlgorithm $ signer ,
71- string $ canonicalizationAlg = Constants ::C14N_EXCLUSIVE_WITHOUT_COMMENTS ,
71+ string $ canonicalizationAlg = C ::C14N_EXCLUSIVE_WITHOUT_COMMENTS ,
7272 ?KeyInfo $ keyInfo = null
7373 ): void {
7474 $ this ->signer = $ signer ;
7575 $ this ->keyInfo = $ keyInfo ;
7676 Assert::oneOf (
7777 $ canonicalizationAlg ,
7878 [
79- Constants ::C14N_INCLUSIVE_WITH_COMMENTS ,
80- Constants ::C14N_EXCLUSIVE_WITHOUT_COMMENTS ,
81- Constants ::C14N_EXCLUSIVE_WITH_COMMENTS ,
82- Constants ::C14N_EXCLUSIVE_WITHOUT_COMMENTS
79+ C ::C14N_INCLUSIVE_WITH_COMMENTS ,
80+ C ::C14N_EXCLUSIVE_WITHOUT_COMMENTS ,
81+ C ::C14N_EXCLUSIVE_WITH_COMMENTS ,
82+ C ::C14N_EXCLUSIVE_WITHOUT_COMMENTS
8383 ],
8484 'Unsupported canonicalization algorithm ' ,
8585 InvalidArgumentException::class
@@ -104,7 +104,7 @@ private function doSign(DOMElement $xml): void
104104 $ digest = $ this ->signer ->getDigest ();
105105
106106 $ transforms = new Transforms ([
107- new Transform (Constants ::XMLDSIG_ENVELOPED ),
107+ new Transform (C ::XMLDSIG_ENVELOPED ),
108108 new Transform ($ this ->c14nAlg )
109109 ]);
110110
0 commit comments