rename ticc.sign/verify/encrypt/decrypt/hash to ticc.xxx_easy

This commit is contained in:
luk.lu
2022-07-23 16:03:17 +08:00
parent 0bc2108351
commit 94152ec736
3 changed files with 8 additions and 8 deletions

4
eth.js
View File

@@ -233,10 +233,10 @@ class ETH {
}
static encrypt (data, key) {
if (!data || !key) throw new Error('Required Params Missing')
return ticc.encrypt(data, key)
return ticc.encrypt_easy({ data, key })
}
static decrypt (data, key) {
return ticc.decrypt(data, key, { format: 'json' }) //return null for wrong key
return ticc.decrypt_easy(data, key, { format: 'json' }) //return null for wrong key
}
static async estimateGasPrice () {
try {