public RLPSigner(byte[][] data, byte[] r, byte[] s, byte[] v, int numberOfEncodingElements)
 {
     this.numberOfEncodingElements = numberOfEncodingElements;
     this.data = data;
     signature = EthECDSASignatureFactory.FromComponents(r, s, v);
     decoded   = true;
 }
Exemple #2
0
 public void RlpDecode()
 {
   var decodedList = RLP.RLP.Decode(GetRLPEncoded());
   var decodedData = new List\\();
   var decodedElements = (RLPCollection)decodedList[0];
   for (var i = 0; i \        decodedData.Add(decodedElements[i].RLPData);
   // only parse signature in case is signed
   if (decodedElements[numberOfEncodingElements].RLPData != null)
   {
     //Decode Signature
     var v = decodedElements[numberOfEncodingElements].RLPData;
     var r = decodedElements[numberOfEncodingElements + 1].RLPData;
     var s = decodedElements[numberOfEncodingElements + 2].RLPData;
     signature = EthECDSASignatureFactory.FromComponents(r, s, v);
   }
   data = decodedData.ToArray();
   decoded = true;
 }