System.Security.Cryptography.MACTripleDES.Setup C# (CSharp) Method

Setup() private method

private Setup ( string strTripleDES, byte rgbKey ) : void
strTripleDES string
rgbKey byte
return void
		private void Setup (string strTripleDES, byte[] rgbKey) 
		{
			tdes = TripleDES.Create (strTripleDES);
			// default padding (as using in Fx 1.0 and 1.1)
			tdes.Padding = PaddingMode.Zeros;
			// if rgbKey is null we keep the randomly generated key
			if (rgbKey != null) {
				// this way we get the TripleDES key validation (like weak
				// and semi-weak keys)
				tdes.Key = rgbKey;
			}
			HashSizeValue = tdes.BlockSize;
			// we use Key property to get the additional validations 
			// (from KeyedHashAlgorithm ancestor)
			Key = tdes.Key;
			mac = new MACAlgorithm (tdes);
			m_disposed = false;
		}