sign() public method

public sign ( ) : byte[]
return byte[]
Ejemplo n.º 1
0
		private void TestSig(ECPrivateKeyParameters key, DeterministicSigTest test)
		{
			DeterministicECDSA dsa = new DeterministicECDSA(test.Hash);
			dsa.setPrivateKey(key);
			dsa.update(Encoding.UTF8.GetBytes(test.Message));
			var result = dsa.sign();

			Assert.Equal(test.K, dsa.LastK);
			Assert.Equal(test.R, dsa.LastR);

			Assert.Equal(test.S, ECDSASignature.FromDER(result).S);
		}