Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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 check for failures and throw the appropriate exception 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 check for failures and throw the appropriate exception 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); } } }
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MarkupObject.cs
- PeerInvitationResponse.cs
- Slider.cs
- SafeRightsManagementPubHandle.cs
- RegexCharClass.cs
- WebPartDisplayModeEventArgs.cs
- QuaternionRotation3D.cs
- StringComparer.cs
- TemplatedAdorner.cs
- elementinformation.cs
- ListParagraph.cs
- METAHEADER.cs
- UpdateRecord.cs
- StatusStrip.cs
- Expander.cs
- XmlIlTypeHelper.cs
- WindowsGrip.cs
- DataKeyArray.cs
- WebRequestModuleElement.cs
- UIElementParaClient.cs
- FieldNameLookup.cs
- Container.cs
- CacheMemory.cs
- RecommendedAsConfigurableAttribute.cs
- GestureRecognitionResult.cs
- ListBoxChrome.cs
- ViewLoader.cs
- NavigationProgressEventArgs.cs
- NullEntityWrapper.cs
- CompilerGlobalScopeAttribute.cs
- SpnegoTokenAuthenticator.cs
- Trace.cs
- FullTextState.cs
- DigestTraceRecordHelper.cs
- ComponentChangedEvent.cs
- SapiRecoContext.cs
- RowSpanVector.cs
- MatrixCamera.cs
- MailWriter.cs
- WpfXamlMember.cs
- ThrowOnMultipleAssignment.cs
- DoubleLink.cs
- NamedPipeTransportElement.cs
- dataprotectionpermission.cs
- TrackingAnnotationCollection.cs
- IdentityReference.cs
- PseudoWebRequest.cs
- LocationUpdates.cs
- WebBrowsableAttribute.cs
- ErrorLog.cs
- MultipleViewPatternIdentifiers.cs
- KnownBoxes.cs
- PerformanceCountersElement.cs
- ReadOnlyDataSource.cs
- Classification.cs
- BamlRecords.cs
- nulltextnavigator.cs
- ProcessInputEventArgs.cs
- TextInfo.cs
- Interlocked.cs
- AccessDataSourceView.cs
- BaseTemplateBuildProvider.cs
- ToolZoneDesigner.cs
- XdrBuilder.cs
- WinEventHandler.cs
- ZipPackagePart.cs
- ValueUtilsSmi.cs
- XmlNodeChangedEventManager.cs
- LinqDataSourceDisposeEventArgs.cs
- RuleSettingsCollection.cs
- CodeTypeReferenceExpression.cs
- WSFederationHttpSecurityElement.cs
- SubpageParaClient.cs
- Funcletizer.cs
- SpotLight.cs
- CompModSwitches.cs
- ApplicationServiceHelper.cs
- IDReferencePropertyAttribute.cs
- LocalFileSettingsProvider.cs
- Sentence.cs
- Variable.cs
- StyleModeStack.cs
- GridViewCommandEventArgs.cs
- EnumConverter.cs
- ProfileGroupSettingsCollection.cs
- Line.cs
- DbMetaDataCollectionNames.cs
- OracleEncoding.cs
- AncestorChangedEventArgs.cs
- PointCollection.cs
- TypeElement.cs
- ScrollProviderWrapper.cs
- XmlEncodedRawTextWriter.cs
- ApplySecurityAndSendAsyncResult.cs
- InternalEnumValidatorAttribute.cs
- UseManagedPresentationElement.cs
- ProgressBarAutomationPeer.cs
- AutoSizeComboBox.cs
- TransactedBatchingElement.cs
- UInt64Storage.cs