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
- AsymmetricKeyExchangeFormatter.cs
- WebControlAdapter.cs
- PreProcessInputEventArgs.cs
- MetadataFile.cs
- CommonObjectSecurity.cs
- NumberFunctions.cs
- ReachVisualSerializer.cs
- DataGridColumnFloatingHeader.cs
- FlowLayoutPanel.cs
- SQLInt16Storage.cs
- TabItemWrapperAutomationPeer.cs
- CorePropertiesFilter.cs
- XmlSchemaExternal.cs
- ProjectionQueryOptionExpression.cs
- ConstraintConverter.cs
- ScriptManager.cs
- DataGridViewRowHeaderCell.cs
- ConnectionManagementElement.cs
- ModelItemKeyValuePair.cs
- GridView.cs
- DeflateStream.cs
- cookiecollection.cs
- HttpRequestCacheValidator.cs
- ModelItem.cs
- WmlValidatorAdapter.cs
- FileDataSourceCache.cs
- Paragraph.cs
- ScriptingSectionGroup.cs
- Figure.cs
- TextEvent.cs
- StreamGeometry.cs
- InlinedAggregationOperatorEnumerator.cs
- GridViewSortEventArgs.cs
- ConvertersCollection.cs
- DbgCompiler.cs
- FrameworkElement.cs
- ProxyWebPart.cs
- ServiceModelConfiguration.cs
- WebServiceAttribute.cs
- RtfFormatStack.cs
- DecimalFormatter.cs
- WebPartTransformer.cs
- TemplateBindingExtension.cs
- WindowsClientElement.cs
- IntegerFacetDescriptionElement.cs
- InProcStateClientManager.cs
- CustomAssemblyResolver.cs
- ColorBlend.cs
- FontInfo.cs
- CacheForPrimitiveTypes.cs
- TypeTypeConverter.cs
- WebPartEditVerb.cs
- KeyInterop.cs
- XmlNodeComparer.cs
- XamlPointCollectionSerializer.cs
- FileBasedResourceGroveler.cs
- UnitySerializationHolder.cs
- XmlComment.cs
- ProtocolState.cs
- PageBuildProvider.cs
- CompilerScopeManager.cs
- DecimalFormatter.cs
- MetadataCache.cs
- GifBitmapDecoder.cs
- WeakHashtable.cs
- MobileTextWriter.cs
- CustomAssemblyResolver.cs
- AdornerDecorator.cs
- EventLogPermissionEntry.cs
- GlobalAllocSafeHandle.cs
- ZipFileInfoCollection.cs
- CodeGotoStatement.cs
- ParentQuery.cs
- SocketAddress.cs
- AssociationTypeEmitter.cs
- Ops.cs
- ToolboxService.cs
- SHA512Managed.cs
- UnitySerializationHolder.cs
- PerformanceCounterPermissionEntry.cs
- SystemIPAddressInformation.cs
- ListBox.cs
- SaveFileDialog.cs
- CellParagraph.cs
- ToolStripItemClickedEventArgs.cs
- OneWayElement.cs
- ProcessHostServerConfig.cs
- Unit.cs
- _NetRes.cs
- BamlWriter.cs
- DataGridViewColumnStateChangedEventArgs.cs
- LayoutExceptionEventArgs.cs
- TemplateColumn.cs
- ColorConverter.cs
- XmlSchemaObjectTable.cs
- MoveSizeWinEventHandler.cs
- HtmlMeta.cs
- _SpnDictionary.cs
- ExceptionHandlerDesigner.cs
- MemoryPressure.cs