mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 10:49:36 +02:00
PGP 2FA support
This commit is contained in:
parent
a9377ccb8d
commit
1a0b33c80d
151 changed files with 9077 additions and 2318 deletions
17
objects/singpolyma/openpgp-php/examples/verify.php
Normal file
17
objects/singpolyma/openpgp-php/examples/verify.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
@include_once dirname(__FILE__).'/../vendor/autoload.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
|
||||
|
||||
/* Parse public key from STDIN */
|
||||
$wkey = OpenPGP_Message::parse(file_get_contents('php://stdin'));
|
||||
|
||||
/* Parse signed message from file named "t" */
|
||||
$m = OpenPGP_Message::parse(file_get_contents('t'));
|
||||
|
||||
/* Create a verifier for the key */
|
||||
$verify = new OpenPGP_Crypt_RSA($wkey);
|
||||
|
||||
/* Dump verification information to STDOUT */
|
||||
var_dump($verify->verify($m));
|
Loading…
Add table
Add a link
Reference in a new issue