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
- ItemAutomationPeer.cs
- XamlStyleSerializer.cs
- XmlReflectionImporter.cs
- MemoryRecordBuffer.cs
- XamlTemplateSerializer.cs
- Size3D.cs
- DuplicateDetector.cs
- Grid.cs
- DrawListViewColumnHeaderEventArgs.cs
- ObjectDataSourceFilteringEventArgs.cs
- DataBoundLiteralControl.cs
- TypeUsageBuilder.cs
- XhtmlTextWriter.cs
- XmlSerializerAssemblyAttribute.cs
- WebContext.cs
- XmlSchemaExternal.cs
- DocumentXPathNavigator.cs
- AsnEncodedData.cs
- PolyLineSegment.cs
- HashStream.cs
- TTSVoice.cs
- infer.cs
- RC2CryptoServiceProvider.cs
- FrugalMap.cs
- FontCacheUtil.cs
- DataDocumentXPathNavigator.cs
- ReplacementText.cs
- EntityCollectionChangedParams.cs
- XPathPatternParser.cs
- DataTableTypeConverter.cs
- XmlTextAttribute.cs
- DerivedKeySecurityTokenStub.cs
- EnterpriseServicesHelper.cs
- ParameterModifier.cs
- CategoryGridEntry.cs
- ContextMenuService.cs
- UserControlParser.cs
- MarshalByRefObject.cs
- UInt32.cs
- GeneralTransform3DCollection.cs
- CheckBoxBaseAdapter.cs
- ClickablePoint.cs
- Expression.cs
- Empty.cs
- BitmapEffectDrawing.cs
- FixedPage.cs
- XmlSerializerOperationBehavior.cs
- GeometryHitTestParameters.cs
- SystemNetHelpers.cs
- OleDbCommandBuilder.cs
- WebRequestModulesSection.cs
- DesignerAdapterAttribute.cs
- PeerInvitationResponse.cs
- XsltException.cs
- Permission.cs
- WebPartMinimizeVerb.cs
- TypeConverterAttribute.cs
- TextEditorTables.cs
- Signature.cs
- ConnectionsZoneAutoFormat.cs
- Query.cs
- ExtensibleClassFactory.cs
- ToolStripRenderer.cs
- ModelPropertyCollectionImpl.cs
- DrawingGroupDrawingContext.cs
- ScrollableControlDesigner.cs
- MissingFieldException.cs
- EmptyEnumerator.cs
- InstanceDataCollectionCollection.cs
- GeneralTransform3DCollection.cs
- IISUnsafeMethods.cs
- FixedFlowMap.cs
- TemplateControlCodeDomTreeGenerator.cs
- FormViewInsertedEventArgs.cs
- OdbcUtils.cs
- SettingsAttributeDictionary.cs
- CancellableEnumerable.cs
- IntermediatePolicyValidator.cs
- EventlogProvider.cs
- MetadataStore.cs
- IdnMapping.cs
- DataGridPagerStyle.cs
- FromReply.cs
- BaseHashHelper.cs
- DetailsViewDeletedEventArgs.cs
- TextBox.cs
- PagePropertiesChangingEventArgs.cs
- DataGridViewHeaderCell.cs
- IDispatchConstantAttribute.cs
- Hex.cs
- FreeFormPanel.cs
- UInt32.cs
- Translator.cs
- ToolStripDropDownItem.cs
- WinFormsUtils.cs
- LinearKeyFrames.cs
- CodeTypeParameter.cs
- DataGridViewRowHeaderCell.cs
- Decorator.cs
- HtmlTableCellCollection.cs