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
- WebMessageEncoderFactory.cs
- ProvidersHelper.cs
- StateWorkerRequest.cs
- VirtualizingStackPanel.cs
- ConfigXmlText.cs
- GAC.cs
- MetabaseSettings.cs
- UserPreferenceChangedEventArgs.cs
- GlobalizationAssembly.cs
- IUnknownConstantAttribute.cs
- XmlSchemaRedefine.cs
- ErrorFormatter.cs
- XamlRtfConverter.cs
- SchemaAttDef.cs
- StringDictionaryWithComparer.cs
- NativeMethodsCLR.cs
- FocusTracker.cs
- KeyValuePair.cs
- DrawListViewColumnHeaderEventArgs.cs
- RuntimeConfigLKG.cs
- RegionIterator.cs
- GB18030Encoding.cs
- DPTypeDescriptorContext.cs
- Timer.cs
- HttpException.cs
- ItemsControlAutomationPeer.cs
- SqlTypeSystemProvider.cs
- HandledEventArgs.cs
- DataSourceControl.cs
- DiagnosticTrace.cs
- Activator.cs
- Event.cs
- AsmxEndpointPickerExtension.cs
- Transform.cs
- ToolStripContainerDesigner.cs
- SecureEnvironment.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- CriticalHandle.cs
- ValidationErrorCollection.cs
- EventWaitHandle.cs
- BaseDataList.cs
- ControlValuePropertyAttribute.cs
- WebPartDescriptionCollection.cs
- DynamicActionMessageFilter.cs
- ToolTip.cs
- LastQueryOperator.cs
- Helpers.cs
- SmiEventSink_Default.cs
- Positioning.cs
- StreamGeometryContext.cs
- DependencyPropertyHelper.cs
- ArgumentDirectionHelper.cs
- WizardForm.cs
- SessionStateUtil.cs
- BufferManager.cs
- Opcode.cs
- NameObjectCollectionBase.cs
- XmlDataProvider.cs
- BuildResultCache.cs
- ExceptionHandlerDesigner.cs
- PasswordBox.cs
- SessionPageStatePersister.cs
- DataSourceView.cs
- SiteMapSection.cs
- SemanticBasicElement.cs
- GridViewCancelEditEventArgs.cs
- BufferedGraphicsManager.cs
- MsmqBindingElementBase.cs
- StatusBarDrawItemEvent.cs
- FrameworkRichTextComposition.cs
- TypeUsage.cs
- RequestQueue.cs
- Canonicalizers.cs
- RecordBuilder.cs
- CommandBindingCollection.cs
- XmlReaderSettings.cs
- XsltFunctions.cs
- RoleServiceManager.cs
- ObjectNavigationPropertyMapping.cs
- XPathDescendantIterator.cs
- ConnectionInterfaceCollection.cs
- DriveInfo.cs
- FunctionQuery.cs
- IPipelineRuntime.cs
- SimpleApplicationHost.cs
- TextDecoration.cs
- TcpProcessProtocolHandler.cs
- mactripleDES.cs
- Dispatcher.cs
- RootBrowserWindowProxy.cs
- PropertyEntry.cs
- MouseCaptureWithinProperty.cs
- DrawingVisual.cs
- ResourceContainer.cs
- BufferedWebEventProvider.cs
- NetStream.cs
- DynamicArgumentDialog.cs
- BuildManagerHost.cs
- ReversePositionQuery.cs
- DescendantOverDescendantQuery.cs