[英]How can I check if the private key of Ethereum is valid in C#?
I searched about Wallet.fromPrrivateKey in ethereumjs-wallet, and privateKeyVerify in secp256k1.我在 ethereumjs-wallet 中搜索了 Wallet.fromPrrivateKey,在 secp256k1 中搜索了 privateKeyVerify。 But I'm using Unity & Nethereum, so I can't use that.但我使用的是 Unity 和 Nethereum,所以我不能使用它。 Is there any way to validate the private key in C#?有没有办法验证C#中的私钥?
The private key is just a random 256-bit integer number.私钥只是一个随机的 256 位 integer 数字。
You just need to check it is > 0
and < max private key value
that can be found here .您只需要检查它是否> 0
和 <可以在此处找到的< max private key value
。
Private keys do not have checksums or anything like that.私钥没有校验和或类似的东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.