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
- TemplateXamlParser.cs
- MarshalDirectiveException.cs
- ExtractCollection.cs
- FreezableCollection.cs
- _OverlappedAsyncResult.cs
- UpdateRecord.cs
- CryptoApi.cs
- HttpHostedTransportConfiguration.cs
- PieceDirectory.cs
- NavigationFailedEventArgs.cs
- DataGridViewRowsAddedEventArgs.cs
- Panel.cs
- AttributeCollection.cs
- SerializationEventsCache.cs
- WebPartTracker.cs
- ChannelManagerService.cs
- ApplicationFileCodeDomTreeGenerator.cs
- TraceRecord.cs
- PLINQETWProvider.cs
- AppDomainUnloadedException.cs
- OdbcErrorCollection.cs
- CodeExporter.cs
- DataPagerFieldCommandEventArgs.cs
- ObjectListItem.cs
- MetafileEditor.cs
- StrongNameMembershipCondition.cs
- ImageButton.cs
- StrokeRenderer.cs
- RoutingBehavior.cs
- SessionStateUtil.cs
- CacheEntry.cs
- OrCondition.cs
- Int32CollectionValueSerializer.cs
- BuildDependencySet.cs
- XmlSerializerAssemblyAttribute.cs
- DbXmlEnabledProviderManifest.cs
- Animatable.cs
- XsltConvert.cs
- HMACSHA256.cs
- AssociationSetEnd.cs
- AuthenticationService.cs
- PropertyMetadata.cs
- CommandHelpers.cs
- Bind.cs
- FileDialogCustomPlace.cs
- SQLDateTime.cs
- XLinq.cs
- DocumentPaginator.cs
- StreamingContext.cs
- InheritanceContextChangedEventManager.cs
- ModulesEntry.cs
- Win32MouseDevice.cs
- ZoneMembershipCondition.cs
- BaseCodePageEncoding.cs
- XmlSchemaGroup.cs
- ZoneIdentityPermission.cs
- UIElement.cs
- CompressedStack.cs
- SecurityRuntime.cs
- CookieHandler.cs
- EventTask.cs
- LogWriteRestartAreaAsyncResult.cs
- HandlerBase.cs
- PointConverter.cs
- Win32Native.cs
- ObjectDataSourceDisposingEventArgs.cs
- ReflectionPermission.cs
- List.cs
- Bits.cs
- Listbox.cs
- QilReplaceVisitor.cs
- EntityKeyElement.cs
- ClientUrlResolverWrapper.cs
- Literal.cs
- ImageCollectionCodeDomSerializer.cs
- StylusPointPropertyInfoDefaults.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- CompatibleComparer.cs
- RSAOAEPKeyExchangeFormatter.cs
- FormViewRow.cs
- ImplicitInputBrush.cs
- Popup.cs
- NativeMethods.cs
- CaseInsensitiveHashCodeProvider.cs
- WebReferencesBuildProvider.cs
- StringDictionaryCodeDomSerializer.cs
- X509CertificateCollection.cs
- SqlConnectionStringBuilder.cs
- ActiveXHost.cs
- DataBoundControlHelper.cs
- CookieParameter.cs
- ApplicationGesture.cs
- GuidTagList.cs
- Task.cs
- ResumeStoryboard.cs
- RowParagraph.cs
- ToolStripSettings.cs
- SvcMapFileSerializer.cs
- Menu.cs
- MutexSecurity.cs