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
- _TransmitFileOverlappedAsyncResult.cs
- WeakReferenceList.cs
- DataGridViewSelectedColumnCollection.cs
- DetailsViewPageEventArgs.cs
- XslException.cs
- ControlSerializer.cs
- LassoSelectionBehavior.cs
- SystemWebSectionGroup.cs
- MarginsConverter.cs
- XomlCompilerHelpers.cs
- CommandDevice.cs
- ChangePassword.cs
- OracleException.cs
- wgx_render.cs
- ErrorEventArgs.cs
- DefaultPrintController.cs
- Application.cs
- SqlMethods.cs
- NotCondition.cs
- FormatControl.cs
- MethodToken.cs
- HostedAspNetEnvironment.cs
- adornercollection.cs
- XmlComplianceUtil.cs
- Translator.cs
- RequestCacheValidator.cs
- DeadCharTextComposition.cs
- CellTreeNodeVisitors.cs
- DataRecordObjectView.cs
- InputMethodStateTypeInfo.cs
- OracleParameterBinding.cs
- LayoutManager.cs
- TextBoxBase.cs
- ISAPIRuntime.cs
- odbcmetadatacolumnnames.cs
- UmAlQuraCalendar.cs
- _TransmitFileOverlappedAsyncResult.cs
- Collection.cs
- SymbolType.cs
- OleDbMetaDataFactory.cs
- XmlDocumentSurrogate.cs
- ObjectItemCollection.cs
- basenumberconverter.cs
- TcpSocketManager.cs
- CodeConditionStatement.cs
- VariableModifiersHelper.cs
- TabItemWrapperAutomationPeer.cs
- FillRuleValidation.cs
- WebPartTransformerAttribute.cs
- ClonableStack.cs
- GroupDescription.cs
- XNodeValidator.cs
- CachedFontFamily.cs
- __ConsoleStream.cs
- PropertyNames.cs
- ComboBox.cs
- DesignConnection.cs
- UnmanagedMemoryStream.cs
- HandlerMappingMemo.cs
- DataContractSerializerOperationGenerator.cs
- ColorMatrix.cs
- TypeResolvingOptionsAttribute.cs
- BatchStream.cs
- DataGridToolTip.cs
- ScriptingWebServicesSectionGroup.cs
- PeerNameRecord.cs
- OleDbFactory.cs
- OdbcConnection.cs
- Win32Interop.cs
- EntityEntry.cs
- WindowsComboBox.cs
- ZoneButton.cs
- ThreadExceptionEvent.cs
- GradientBrush.cs
- AspNetSynchronizationContext.cs
- TranslateTransform.cs
- filewebrequest.cs
- TextServicesCompartmentContext.cs
- SqlDataSourceWizardForm.cs
- Condition.cs
- Section.cs
- StickyNoteContentControl.cs
- Opcode.cs
- MouseEventArgs.cs
- PtsPage.cs
- Queue.cs
- XmlHierarchicalEnumerable.cs
- CfgParser.cs
- DataGridTableCollection.cs
- Int32Rect.cs
- GradientStop.cs
- CqlLexer.cs
- MetaModel.cs
- CellParaClient.cs
- RoleManagerModule.cs
- SharedHttpsTransportManager.cs
- UnaryNode.cs
- SizeKeyFrameCollection.cs
- BlockUIContainer.cs
- AssemblyUtil.cs