// npm install eth-crypto --save | |
const EthCrypto = require('eth-crypto'); | |
const privateKey = '0x61ce8b95ca5fd6f55cd97ac60817777bdf64f1670e903758ce53efc32c3dffeb'; | |
const encryptedMessage = { | |
iv: '3c12aa4bdbb6219479eb0ebe62ee908f', | |
ephemPublicKey: '04f70ca0c9e6741c8709de1cfec75f980823dd753b9c1a87cc4afbfdf44707b1830c0385b0fa808fa18f55a5f7551370242d95cd61546823fda2f73d26e1906a81', | |
ciphertext: 'a21abfac3a44ca4c22bdfb23a97a115f', | |
mac: 'b4d282d05422672689bd1027c948b2189dc52e7f9101e753be6fb3df844572c4' | |
}; | |
(async() => { | |
const decryptedMessage = await EthCrypto.decryptWithPrivateKey(privateKey, encryptedMessage); | |
console.log(decryptedMessage); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
piyo!