this.description="Input: the ASCII-armoured PGP message you want to decrypt.\n<br><br>\nArguments: the ASCII-armoured PGP private key of the recipient, \n(and the private key password if necessary).\n<br><br>\nPretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.\n<br><br>\nThis function uses the Keybase implementation of PGP.";
this.inputType="string";
this.outputType="string";
this.args=[
{
"name":"Private key of recipient",
"type":"text",
"value":""
},
{
"name":"Private key passphrase",
"type":"string",
"value":""
}
];
}
/**
*@param{string}input
*@param{Object[]}args
*@returns{string}
*/
asyncrun(input,args){
constencryptedMessage=input,
privateKey=args[0],
passphrase=args[1],
keyring=newkbpgp.keyring.KeyRing();
letplaintextMessage;
if(!privateKey)return"Enter the private key of the recipient.";