Commit 7d1cda51 authored by Kamron Aroonrua's avatar Kamron Aroonrua 💬

pgp

parent e720b6ac
......@@ -60,7 +60,7 @@ function perform_function(context,request,response){
if (['decrypt','dec'].indexOf(req_function) >= 0){
pgplib.decrypt({
privatekey : req_privatekey,
private_key : req_privatekey,
passphrase : req_passphrase,
armor_in : (typeof data == 'string'),
data : data
......@@ -72,14 +72,12 @@ function perform_function(context,request,response){
dout = d.toString('base64');
}
ok_out(d);
})
/*
.catch(e =>{
}).catch(e =>{
error_out('decrypt error');
})*/
})
} else if (['encrypt','enc'].indexOf(req_function) >= 0){
pgplib.encrypt({
publickey : req_publickey,
public_key : req_publickey,
armor_out : (['armor','text'].indexOf(req_output) >= 0),
data : data
}).then(d => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment