mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-03-15 19:50:58 +00:00
fix: lint
This commit is contained in:
parent
487cd076fb
commit
2c294b56ab
@ -31,7 +31,7 @@ class RsaPublicKey {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async encrypt (bytes) {
|
encrypt (bytes) {
|
||||||
return crypto.encrypt(this._key, bytes)
|
return crypto.encrypt(this._key, bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ class RsaPrivateKey {
|
|||||||
return new RsaPublicKey(this._publicKey)
|
return new RsaPublicKey(this._publicKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
async decrypt (bytes) {
|
decrypt (bytes) {
|
||||||
return crypto.decrypt(this._key, bytes)
|
return crypto.decrypt(this._key, bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,10 +69,10 @@ exports.hashAndVerify = async function (key, sig, msg) { // eslint-disable-line
|
|||||||
return verify.verify(pem, sig)
|
return verify.verify(pem, sig)
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.encrypt = async function (key, bytes) {
|
exports.encrypt = function (key, bytes) {
|
||||||
return crypto.publicEncrypt(jwkToPem(key), bytes)
|
return crypto.publicEncrypt(jwkToPem(key), bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.decrypt = async function (key, bytes) {
|
exports.decrypt = function (key, bytes) {
|
||||||
return crypto.privateDecrypt(jwkToPem(key), bytes)
|
return crypto.privateDecrypt(jwkToPem(key), bytes)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user