Exemplo n.º 1
0
 public bool VerifyAllowingOnlyLowS(byte[] hash, NasECDSASignature sig)
 {
     if (!sig.IsLowS)
     {
         return(false);
     }
     return(_ecKey.Verify(hash, sig.ECDSASignature));
 }
Exemplo n.º 2
0
 public static NasECKey RecoverFromSignature(NasECDSASignature signature, int recId, byte[] hash)
 {
     return(new NasECKey(ECKey.RecoverFromSignature(recId, signature.ECDSASignature, hash, false)));
 }
Exemplo n.º 3
0
 public bool Verify(byte[] hash, NasECDSASignature sig)
 {
     return(_ecKey.Verify(hash, sig.ECDSASignature));
 }
Exemplo n.º 4
0
        //public static int GetRecIdFromVChain(byte[] vChain, BigInteger chainId)
        //{
        //    return GetRecIdFromVChain(vChain.ToBigIntegerFromRLPDecoded(), chainId);
        //}

        public static NasECKey RecoverFromSignature(NasECDSASignature signature, byte[] hash)
        {
            return(new NasECKey(ECKey.RecoverFromSignature(GetRecIdFromV(signature.V), signature.ECDSASignature, hash,
                                                           false)));
        }