public void InitializedStateAfterInitialization() { PresentableMD5 md5 = new PresentableMD5(); md5.Initialize(CStreamWriter.Empty); Assert.AreEqual(md5.CurrentState.State, MD5StateDescription.INITIALIZED); }
public PresentationContainer(PresentableMD5 presentableMd5) { DataContext = md5 = presentableMd5; InitializeComponent(); Width = double.NaN; Height = double.NaN; }
public MD5() { md5 = new PresentableMD5(); md5.AddSkippedState(MD5StateDescription.STARTING_ROUND_STEP); md5.AddSkippedState(MD5StateDescription.FINISHING_COMPRESSION); presentationContainer = new PresentationContainer(md5); md5.StatusChanged += Md5StatusChanged; }
private void VerifyResult(byte[] data) { System.Security.Cryptography.MD5 builtinMD5 = System.Security.Cryptography.MD5.Create(); byte[] builtinResult = builtinMD5.ComputeHash(data); PresentableMD5 presentableMD5 = new PresentableMD5(); presentableMD5.Initialize(new CStreamWriter(data)); presentableMD5.NextStepUntilFinished(); byte[] presentableMD5Result = presentableMD5.HashValueBytes; CollectionAssert.AreEqual(builtinResult, presentableMD5Result); }
public void UninitializedStateAfterConstruction() { PresentableMD5 md5 = new PresentableMD5(); Assert.AreEqual(md5.CurrentState.State, MD5StateDescription.UNINITIALIZED); }