Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Security / Cryptography / MD5CryptoServiceProvider.cs / 1 / MD5CryptoServiceProvider.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // MD5CryptoServiceProvider.cs // namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public sealed class MD5CryptoServiceProvider : MD5 { private SafeHashHandle _safeHashHandle = null; // // public constructors // public MD5CryptoServiceProvider() { if (Utils.FipsAlgorithmPolicy == 1) throw new InvalidOperationException(Environment.GetResourceString("Cryptography_NonCompliantFIPSAlgorithm")); SafeHashHandle safeHashHandle = SafeHashHandle.InvalidHandle; // _CreateHash will Utils._CreateHash(Utils.StaticProvHandle, Constants.CALG_MD5, ref safeHashHandle); _safeHashHandle = safeHashHandle; } protected override void Dispose(bool disposing) { if (_safeHashHandle != null && !_safeHashHandle.IsClosed) _safeHashHandle.Dispose(); base.Dispose(disposing); } // // public methods // public override void Initialize() { if (_safeHashHandle != null && !_safeHashHandle.IsClosed) _safeHashHandle.Dispose(); SafeHashHandle safeHashHandle = SafeHashHandle.InvalidHandle; // _CreateHash will Utils._CreateHash(Utils.StaticProvHandle, Constants.CALG_MD5, ref safeHashHandle); _safeHashHandle = safeHashHandle; } protected override void HashCore(byte[] rgb, int ibStart, int cbSize) { Utils._HashData(_safeHashHandle, rgb, ibStart, cbSize); } protected override byte[] HashFinal() { return Utils._EndHash(_safeHashHandle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AuditLevel.cs
- DetailsViewInsertedEventArgs.cs
- BuildResultCache.cs
- AtomServiceDocumentSerializer.cs
- UserControlCodeDomTreeGenerator.cs
- BindingGraph.cs
- EarlyBoundInfo.cs
- DecoderExceptionFallback.cs
- CloudCollection.cs
- PromptEventArgs.cs
- XamlGridLengthSerializer.cs
- TextTreeUndoUnit.cs
- XsltContext.cs
- SingleAnimation.cs
- WindowsSolidBrush.cs
- FileClassifier.cs
- odbcmetadatacollectionnames.cs
- XmlEncoding.cs
- TimeSpanMinutesConverter.cs
- FormView.cs
- RoutedEventValueSerializer.cs
- DiscoveryVersionConverter.cs
- CollectionEditVerbManager.cs
- Odbc32.cs
- Mapping.cs
- RepeatInfo.cs
- MessageBox.cs
- ContextDataSourceView.cs
- ResolveCriteria11.cs
- ProfileProvider.cs
- RightsManagementEncryptedStream.cs
- ConstructorExpr.cs
- DataGridViewCellEventArgs.cs
- Debug.cs
- RadioButton.cs
- DataObject.cs
- CodeTryCatchFinallyStatement.cs
- TargetException.cs
- FtpCachePolicyElement.cs
- VisualStyleRenderer.cs
- XmlImplementation.cs
- CryptoKeySecurity.cs
- DataGridViewMethods.cs
- HtmlObjectListAdapter.cs
- XmlRootAttribute.cs
- _UncName.cs
- DbSourceParameterCollection.cs
- XmlNamedNodeMap.cs
- ZeroOpNode.cs
- PerformanceCounterCategory.cs
- GridViewRowCollection.cs
- ResourceDescriptionAttribute.cs
- SecurityCriticalDataForSet.cs
- GenericPrincipal.cs
- HttpListenerContext.cs
- DataGridViewBindingCompleteEventArgs.cs
- BaseTreeIterator.cs
- InputDevice.cs
- WeakRefEnumerator.cs
- PointKeyFrameCollection.cs
- Header.cs
- X509ChainPolicy.cs
- DropShadowBitmapEffect.cs
- SqlDependency.cs
- StdValidatorsAndConverters.cs
- TextTreeRootTextBlock.cs
- safex509handles.cs
- BufferedOutputStream.cs
- XmlTextEncoder.cs
- PageRequestManager.cs
- ObjectManager.cs
- InvalidEnumArgumentException.cs
- DuplexClientBase.cs
- XmlNodeWriter.cs
- AssemblyContextControlItem.cs
- LinkLabel.cs
- GeometryDrawing.cs
- wgx_exports.cs
- UrlMappingCollection.cs
- Attributes.cs
- MultiSelector.cs
- WebPartConnectionsCancelVerb.cs
- ButtonBaseAutomationPeer.cs
- SelectionGlyphBase.cs
- DesignerActionUIService.cs
- PauseStoryboard.cs
- CurrencyManager.cs
- XmlAttributeOverrides.cs
- ISFClipboardData.cs
- XmlHelper.cs
- PageThemeBuildProvider.cs
- SqlDataSourceConnectionPanel.cs
- StandardOleMarshalObject.cs
- COMException.cs
- FilteredReadOnlyMetadataCollection.cs
- MetabaseSettings.cs
- listitem.cs
- DocumentPage.cs
- AllMembershipCondition.cs
- DataServiceQueryOfT.cs