Rename openpgp apis: signCleartext --> sign, verifyCleartext --> verify

This commit is contained in:
Tankred Hase 2016-02-07 17:36:48 +07:00
parent f3ae671a57
commit 735ec3df74

View File

@ -203,11 +203,11 @@ export function decrypt({ message, privateKey, publickeys, sessionKey, password,
* @return {Promise<String>} ASCII armored message * @return {Promise<String>} ASCII armored message
* @static * @static
*/ */
export function signCleartext({ data, privateKeys }) { export function sign({ data, privateKeys }) {
privateKeys = privateKeys.length ? privateKeys : [privateKeys]; privateKeys = privateKeys.length ? privateKeys : [privateKeys];
if (asyncProxy) { // use web worker if available if (asyncProxy) { // use web worker if available
return asyncProxy.signCleartext({ data, privateKeys }); return asyncProxy.sign({ data, privateKeys });
} }
return execute(() => { return execute(() => {
@ -229,11 +229,11 @@ export function signCleartext({ data, privateKeys }) {
* { data:String, signatures: [{ keyid:String, valid:Boolean }] } * { data:String, signatures: [{ keyid:String, valid:Boolean }] }
* @static * @static
*/ */
export function verifyCleartext({ message, publicKeys }) { export function verify({ message, publicKeys }) {
publicKeys = publicKeys.length ? publicKeys : [publicKeys]; publicKeys = publicKeys.length ? publicKeys : [publicKeys];
if (asyncProxy) { // use web worker if available if (asyncProxy) { // use web worker if available
return asyncProxy.verifyCleartext({ message, publicKeys }); return asyncProxy.verify({ message, publicKeys });
} }
return execute(() => { return execute(() => {