/*hashing message and then signing it. * debo llamar esto desde el controlador, cierto luis? */ public void HashAndSign() { if (Fmsg != null) { string FprivateKey = FCryptoCurrencyAdvocacy.GetPrivateKey(1); var LSigner = new EthereumMessageSigner(); var LSignature = LSigner.HashAndSign(Fmsg, FprivateKey); //example "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7"); HashMsgRecover(LSigner); } else { throw new ArgumentNullException("Fmsg"); } }
//cada instancia de la clase pedira advocacy_1 que es la actual llave de eth del usuario public SignerMessage(CryptoCurrencyAdvocacy aAdvocacy) { FCryptoCurrencyAdvocacy = aAdvocacy; string privateKey = FCryptoCurrencyAdvocacy.GetPrivateKey(1); }