Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / MD5CryptoServiceProvider.cs / 1305376 / MD5CryptoServiceProvider.cs
using System.Diagnostics.Contracts; // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // MD5CryptoServiceProvider.cs // namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public sealed class MD5CryptoServiceProvider : MD5 { [System.Security.SecurityCritical /*auto-generated*/] private SafeHashHandle _safeHashHandle = null; // // public constructors // [System.Security.SecuritySafeCritical] // auto-generated public MD5CryptoServiceProvider() { if (CryptoConfig.AllowOnlyFipsAlgorithms) throw new InvalidOperationException(Environment.GetResourceString("Cryptography_NonCompliantFIPSAlgorithm")); Contract.EndContractBlock(); // _CreateHash will check for failures and throw the appropriate exception _safeHashHandle = Utils.CreateHash(Utils.StaticProvHandle, Constants.CALG_MD5); } [System.Security.SecuritySafeCritical] // overrides public transparent member protected override void Dispose(bool disposing) { if (_safeHashHandle != null && !_safeHashHandle.IsClosed) _safeHashHandle.Dispose(); base.Dispose(disposing); } // // public methods // [System.Security.SecuritySafeCritical] // auto-generated public override void Initialize() { if (_safeHashHandle != null && !_safeHashHandle.IsClosed) _safeHashHandle.Dispose(); // _CreateHash will check for failures and throw the appropriate exception _safeHashHandle = Utils.CreateHash(Utils.StaticProvHandle, Constants.CALG_MD5); } [System.Security.SecuritySafeCritical] // overrides protected transparent member protected override void HashCore(byte[] rgb, int ibStart, int cbSize) { Utils.HashData(_safeHashHandle, rgb, ibStart, cbSize); } [System.Security.SecuritySafeCritical] // overrides protected transparent member 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
- CoreSwitches.cs
- IUnknownConstantAttribute.cs
- ICspAsymmetricAlgorithm.cs
- SystemException.cs
- ParagraphResult.cs
- PageRanges.cs
- ActivityDelegate.cs
- DriveInfo.cs
- PageRequestManager.cs
- ElementsClipboardData.cs
- ToolZone.cs
- SqlNotificationEventArgs.cs
- RoleGroup.cs
- DataGridRowDetailsEventArgs.cs
- LoginUtil.cs
- ChannelBinding.cs
- SchemaElementDecl.cs
- XmlDocumentType.cs
- TemplateColumn.cs
- Soap12ProtocolImporter.cs
- HttpModuleAction.cs
- ConstantExpression.cs
- EntitySetDataBindingList.cs
- BindingValueChangedEventArgs.cs
- RawStylusInput.cs
- ConfigurationLocationCollection.cs
- ParameterToken.cs
- SolidBrush.cs
- MemberDescriptor.cs
- WorkflowEnvironment.cs
- documentation.cs
- TextBoxView.cs
- MemberRestriction.cs
- DataSourceViewSchemaConverter.cs
- HttpCachePolicy.cs
- DataTableTypeConverter.cs
- LZCodec.cs
- WizardPanelChangingEventArgs.cs
- DbMetaDataColumnNames.cs
- UnsafeNativeMethods.cs
- AnnotationComponentChooser.cs
- HttpDebugHandler.cs
- OutputCacheSettings.cs
- DataGridViewControlCollection.cs
- CodeActivity.cs
- odbcmetadatafactory.cs
- XmlDataProvider.cs
- WebEventCodes.cs
- TextServicesManager.cs
- EditorBrowsableAttribute.cs
- HttpCachePolicy.cs
- ECDiffieHellman.cs
- RelationshipConstraintValidator.cs
- ComponentChangingEvent.cs
- Matrix3DValueSerializer.cs
- CurrentChangedEventManager.cs
- AvTraceFormat.cs
- SoapFault.cs
- SystemIPv4InterfaceProperties.cs
- WebFormDesignerActionService.cs
- DataGridRelationshipRow.cs
- XmlComment.cs
- PackageStore.cs
- SqlStatistics.cs
- NoPersistProperty.cs
- LinqDataSourceContextEventArgs.cs
- IncrementalReadDecoders.cs
- SQLMoneyStorage.cs
- Section.cs
- Point4DValueSerializer.cs
- EditingScope.cs
- KerberosSecurityTokenParameters.cs
- ToolStripLabel.cs
- MonthChangedEventArgs.cs
- SrgsGrammar.cs
- Int16AnimationUsingKeyFrames.cs
- WindowsListBox.cs
- DataGridViewComboBoxEditingControl.cs
- XmlWrappingReader.cs
- Point.cs
- Hashtable.cs
- CodeGeneratorOptions.cs
- PingOptions.cs
- HttpValueCollection.cs
- DesignBindingConverter.cs
- TableCell.cs
- ContentControl.cs
- ToolboxComponentsCreatedEventArgs.cs
- IsolatedStorageFileStream.cs
- MetadataSerializer.cs
- WebPartConnectionsDisconnectVerb.cs
- ImageMapEventArgs.cs
- Win32.cs
- FrameworkContentElement.cs
- TrustLevel.cs
- XhtmlBasicLiteralTextAdapter.cs
- TraceLevelStore.cs
- MappableObjectManager.cs
- columnmapfactory.cs
- DataControlImageButton.cs