NBitcoin.BouncyCastle.Asn1.DerSequenceGenerator.Close C# (CSharp) Method

Close() public method

public Close ( ) : void
return void
		public override void Close()
		{
			WriteDerEncoded(Asn1Tags.Constructed | Asn1Tags.Sequence, _bOut.ToArray());
		}
	}

Usage Example

Ejemplo n.º 1
0
		/**
		* What we get back from the signer are the two components of a signature, r and s. To get a flat byte stream
		* of the type used by Bitcoin we have to encode them using DER encoding, which is just a way to pack the two
		* components into a structure.
		*/
		public byte[] ToDER()
		{
			// Usually 70-72 bytes.
			MemoryStream bos = new MemoryStream(72);
			DerSequenceGenerator seq = new DerSequenceGenerator(bos);
			seq.AddObject(new DerInteger(R));
			seq.AddObject(new DerInteger(S));
			seq.Close();
			return bos.ToArray();

		}
All Usage Examples Of NBitcoin.BouncyCastle.Asn1.DerSequenceGenerator::Close