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
- SuppressMergeCheckAttribute.cs
- DrawingState.cs
- TextParagraphView.cs
- Win32.cs
- DocumentSchemaValidator.cs
- RealizationContext.cs
- LexicalChunk.cs
- URLBuilder.cs
- HandlerBase.cs
- IIS7WorkerRequest.cs
- DesignerCalendarAdapter.cs
- BookmarkEventArgs.cs
- formatter.cs
- UnmanagedMemoryAccessor.cs
- DateTimeConverter.cs
- DaylightTime.cs
- SqlCacheDependency.cs
- EventProxy.cs
- StateChangeEvent.cs
- SqlBuffer.cs
- ServiceOperationWrapper.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- EdmTypeAttribute.cs
- DataObject.cs
- ActivationArguments.cs
- ContainerVisual.cs
- NestPullup.cs
- IImplicitResourceProvider.cs
- ErrorCodes.cs
- RunClient.cs
- RecognizedWordUnit.cs
- PriorityItem.cs
- CharEntityEncoderFallback.cs
- SignedXml.cs
- SHA256Managed.cs
- MessageDecoder.cs
- BooleanFunctions.cs
- CategoryNameCollection.cs
- ICspAsymmetricAlgorithm.cs
- updateconfighost.cs
- MenuItemCollectionEditor.cs
- storagemappingitemcollection.viewdictionary.cs
- PKCS1MaskGenerationMethod.cs
- AuthenticationSection.cs
- RegexCompiler.cs
- MatrixUtil.cs
- StaticResourceExtension.cs
- TcpClientSocketManager.cs
- Unit.cs
- ReadOnlyObservableCollection.cs
- WebConfigurationHost.cs
- Stylus.cs
- TcpHostedTransportConfiguration.cs
- ObjectParameterCollection.cs
- BulletDecorator.cs
- SiteMapDataSource.cs
- AvTraceFormat.cs
- FtpWebResponse.cs
- TextParentUndoUnit.cs
- PlaceHolder.cs
- ClientSettingsSection.cs
- WebPartConnectionsDisconnectVerb.cs
- XmlUrlResolver.cs
- BuildManagerHost.cs
- ObjRef.cs
- SQLDecimal.cs
- ProxyWebPartConnectionCollection.cs
- RadioButtonFlatAdapter.cs
- SponsorHelper.cs
- DotExpr.cs
- MarkupExtensionParser.cs
- CommonXSendMessage.cs
- SettingsSection.cs
- HtmlMeta.cs
- _AuthenticationState.cs
- LogReservationCollection.cs
- SmiContext.cs
- TemplateBindingExpression.cs
- XPathScanner.cs
- ProxyManager.cs
- PreservationFileReader.cs
- TakeOrSkipWhileQueryOperator.cs
- PtsHelper.cs
- EdmProperty.cs
- Pair.cs
- DataRowComparer.cs
- ImageSourceValueSerializer.cs
- DiagnosticTraceSchemas.cs
- WebPartCatalogAddVerb.cs
- TableSectionStyle.cs
- PasswordRecovery.cs
- HttpWriter.cs
- coordinatorscratchpad.cs
- UInt32Converter.cs
- UriSectionData.cs
- FileVersion.cs
- TemplateControl.cs
- ReachSerializerAsync.cs
- DataViewListener.cs
- CursorConverter.cs