Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
decryptMessage (withAccount, encryptedData) {
const wallet = this._getWalletForAccount(withAccount)
const privKey = ethUtil.stripHexPrefix(wallet.getPrivateKey())
const privKeyBuffer = new Buffer(privKey, 'hex')
const sig = sigUtil.decrypt(encryptedData, privKey)
return Promise.resolve(sig)
}