| 1 | <?php |
||
| 17 | class SignedXml |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var XmlseclibsAdapter |
||
| 21 | */ |
||
| 22 | private $adapter; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * SignedXml constructor. |
||
| 26 | */ |
||
| 27 | 4 | public function __construct() |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Firma el contenido del xml y retorna el contenido firmado. |
||
| 35 | * |
||
| 36 | * @param string $content |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | 4 | public function sign($content) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Verifica la firma del xml. |
||
| 49 | * |
||
| 50 | * @param string $content |
||
| 51 | * @return bool |
||
| 52 | */ |
||
| 53 | 2 | public function verify($content) |
|
| 59 | |||
| 60 | /** |
||
| 61 | * @param string $key |
||
| 62 | */ |
||
| 63 | 4 | public function setPrivateKey($key) |
|
| 67 | |||
| 68 | /** |
||
| 69 | * @param string $key |
||
| 70 | */ |
||
| 71 | 2 | public function setPublicKey($key) |
|
| 75 | |||
| 76 | /** |
||
| 77 | * @param string $content |
||
| 78 | * @return \DOMDocument |
||
| 79 | */ |
||
| 80 | 4 | private function getDocXml($content) |
|
| 87 | } |