1 year ago
#195751

levi-jcbs
GnuPG PHP Module: Check key passphrase
When I run gnupg_adddecryptkey
with a correct key identifier, but wrong passphrase, it does not fail, but returns true
:
$res = gnupg_init();
gnupg_adddecryptkey($res,"8660281B6051D071D94B5B230549F9DC851566DC","correctpassphrase"); // true
gnupg_adddecryptkey($res,"WRONGKEYIDENTIFIER","correctpassphrase"); // false
gnupg_adddecryptkey($res,"8660281B6051D071D94B5B230549F9DC851566DC","wrongpassphrase"); // true
So how to check a key passphrase of gnupg key in PHP?
php
gnupg
pecl
0 Answers
Your Answer