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
- RegexCode.cs
- ProgressBarAutomationPeer.cs
- StringFunctions.cs
- SendSecurityHeaderElement.cs
- RecognitionEventArgs.cs
- SendKeys.cs
- LinearGradientBrush.cs
- NavigationHelper.cs
- FacetDescriptionElement.cs
- ToolStripRenderEventArgs.cs
- WindowProviderWrapper.cs
- DaylightTime.cs
- SecurityState.cs
- AppDomainProtocolHandler.cs
- Registry.cs
- GridViewRowPresenter.cs
- XXXOnTypeBuilderInstantiation.cs
- FixedSOMPageElement.cs
- XmlCDATASection.cs
- MembershipSection.cs
- HtmlAnchor.cs
- PrivateFontCollection.cs
- ActivityExecutionContextCollection.cs
- MetadataUtil.cs
- SchemaCollectionPreprocessor.cs
- StructuredTypeEmitter.cs
- DoubleIndependentAnimationStorage.cs
- SQLBytesStorage.cs
- ObjectSet.cs
- CodeVariableReferenceExpression.cs
- MiniConstructorInfo.cs
- Win32Interop.cs
- OfTypeExpression.cs
- RuleInfoComparer.cs
- ping.cs
- XmlParser.cs
- FormViewUpdatedEventArgs.cs
- DesignerTransaction.cs
- SpeakProgressEventArgs.cs
- TextBoxRenderer.cs
- DesignerActionGlyph.cs
- ExpandCollapseProviderWrapper.cs
- DataGridViewRowCancelEventArgs.cs
- HtmlInputButton.cs
- HyperLinkField.cs
- COM2FontConverter.cs
- XmlValueConverter.cs
- AssemblyCache.cs
- RuleSettings.cs
- SqlParameterizer.cs
- Activator.cs
- Accessors.cs
- DataKeyCollection.cs
- x509utils.cs
- CodePageEncoding.cs
- Manipulation.cs
- NamespaceQuery.cs
- InputScopeConverter.cs
- processwaithandle.cs
- CompilationPass2Task.cs
- OrderPreservingSpoolingTask.cs
- TypefaceMetricsCache.cs
- AncestorChangedEventArgs.cs
- ControllableStoryboardAction.cs
- FileSecurity.cs
- ElementMarkupObject.cs
- ISAPIRuntime.cs
- DataTableReaderListener.cs
- TransformerConfigurationWizardBase.cs
- AssignDesigner.xaml.cs
- AnimationClockResource.cs
- ToolStripLocationCancelEventArgs.cs
- _ConnectOverlappedAsyncResult.cs
- TableCellCollection.cs
- ColorContextHelper.cs
- AudioLevelUpdatedEventArgs.cs
- ToolStripRendererSwitcher.cs
- LoadedEvent.cs
- TargetInvocationException.cs
- DeclaredTypeValidator.cs
- ContextMenu.cs
- GlobalEventManager.cs
- DelegateSerializationHolder.cs
- HasCopySemanticsAttribute.cs
- HttpTransportSecurityElement.cs
- DesignerHierarchicalDataSourceView.cs
- CommonXSendMessage.cs
- CodeSnippetStatement.cs
- GridViewItemAutomationPeer.cs
- ObjectManager.cs
- TextProperties.cs
- AnnotationResource.cs
- DbDataRecord.cs
- SqlBulkCopy.cs
- SqlDataReaderSmi.cs
- XmlIlVisitor.cs
- DataGridPageChangedEventArgs.cs
- X509ChainElement.cs
- Multiply.cs
- LinqDataSourceStatusEventArgs.cs