| 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) |
|
| 47 | |||
| 48 | /** |
||
| 49 | * Verifica la firma del xml. |
||
| 50 | * |
||
| 51 | * @param string $content |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | 2 | public function verify($content) |
|
| 61 | |||
| 62 | /** |
||
| 63 | * @param string $key |
||
| 64 | */ |
||
| 65 | 4 | public function setPrivateKey($key) |
|
| 69 | |||
| 70 | /** |
||
| 71 | * @param string $key |
||
| 72 | */ |
||
| 73 | 2 | public function setPublicKey($key) |
|
| 77 | } |