简体   繁体   English

使用以太坊私钥加密字符串

[英]using Ethereum private key to encrypt string

I need to encrypt a string using the private key of my account on a Ethereum private network. 我需要在以太坊专用网络上使用我帐户的私钥对字符串进行加密。 How can I do this with web3j? 我该如何使用web3j? The Ethereum cient I use is Geth. 我使用的以太坊科学家是盖斯。

You may find your answer here: https://ethereum.stackexchange.com/questions/3092/how-to-encrypt-a-message-with-the-public-key-of-an-ethereum-address 您可以在这里找到答案: https : //ethereum.stackexchange.com/questions/3092/how-to-encrypt-a-message-with-the-public-key-of-an-ethereum-address

With geth on its own I don't think that it is possible, however with bitcore-lib and bitcore-ecies it is. 单独使用geth是不可能的,但是使用bitcore-libbitcore-ecies可行的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM