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
- LocalizationComments.cs
- Axis.cs
- TextLineResult.cs
- ToolboxService.cs
- Rfc2898DeriveBytes.cs
- GraphicsPath.cs
- FieldAccessException.cs
- ScopeElementCollection.cs
- FileDialogPermission.cs
- ResolvedKeyFrameEntry.cs
- TriState.cs
- AssociativeAggregationOperator.cs
- Compiler.cs
- PropertyGeneratedEventArgs.cs
- AppDomainProtocolHandler.cs
- ReadWriteObjectLock.cs
- FamilyTypeface.cs
- FileChangesMonitor.cs
- EncodingNLS.cs
- WpfKnownTypeInvoker.cs
- StandardOleMarshalObject.cs
- ByteAnimationBase.cs
- PageEventArgs.cs
- SiblingIterators.cs
- ToolboxItemFilterAttribute.cs
- ReaderWriterLock.cs
- UrlAuthorizationModule.cs
- MarshalDirectiveException.cs
- ReadOnlyMetadataCollection.cs
- HttpHandlerAction.cs
- ToolBar.cs
- ASCIIEncoding.cs
- DispatcherExceptionEventArgs.cs
- ConfigXmlText.cs
- DocumentPageView.cs
- WindowsFormsHostPropertyMap.cs
- CurrentTimeZone.cs
- PublishLicense.cs
- UndoEngine.cs
- PackageDigitalSignature.cs
- ThreadStartException.cs
- DataGridViewLinkCell.cs
- ContextProperty.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- MaxSessionCountExceededException.cs
- SettingsSection.cs
- ButtonColumn.cs
- ApplicationContext.cs
- wpf-etw.cs
- CompilerScopeManager.cs
- IgnoreSectionHandler.cs
- PathGeometry.cs
- SplashScreenNativeMethods.cs
- FlowDocumentView.cs
- PointLightBase.cs
- QueryInterceptorAttribute.cs
- HandleCollector.cs
- BlurEffect.cs
- UnsupportedPolicyOptionsException.cs
- ContentValidator.cs
- CodeLabeledStatement.cs
- CommandHelpers.cs
- AspNetHostingPermission.cs
- DbDataSourceEnumerator.cs
- CharEntityEncoderFallback.cs
- NativeMethods.cs
- PageVisual.cs
- DeploymentSection.cs
- _TimerThread.cs
- HtmlControl.cs
- DesignerAutoFormatStyle.cs
- StreamUpdate.cs
- HtmlTable.cs
- TreeNodeEventArgs.cs
- Trace.cs
- MatrixTransform.cs
- Receive.cs
- LinqDataSourceSelectEventArgs.cs
- XLinq.cs
- XmlIlTypeHelper.cs
- ScaleTransform3D.cs
- KeyInstance.cs
- PreloadedPackages.cs
- StrokeNode.cs
- OdbcHandle.cs
- HTTPNotFoundHandler.cs
- MetadataPropertyvalue.cs
- XPathAncestorIterator.cs
- PrintPreviewGraphics.cs
- ClientApiGenerator.cs
- BitmapCodecInfo.cs
- ToolStripGripRenderEventArgs.cs
- EntityDataSourceChangingEventArgs.cs
- PngBitmapDecoder.cs
- Evidence.cs
- HyperLink.cs
- HeaderUtility.cs
- _RequestCacheProtocol.cs
- Sentence.cs
- StaticDataManager.cs