Org.BouncyCastle.Crypto.Modes.GcmBlockCipher.asBlock C# (CSharp) Method

asBlock() private method

private asBlock ( BigInteger bi ) : byte[]
bi BigInteger
return byte[]
		private byte[] asBlock(
			BigInteger bi)
		{
			byte[] b = BigIntegers.AsUnsignedByteArray(bi);
			if (b.Length < 16)
			{
				byte[] tmp = new byte[16];
				Array.Copy(b, 0, tmp, tmp.Length - b.Length, b.Length);
				b = tmp;
			}
			return b;
		}