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
- SweepDirectionValidation.cs
- MorphHelpers.cs
- SessionPageStateSection.cs
- ReferenceSchema.cs
- TypeInfo.cs
- UserControlCodeDomTreeGenerator.cs
- RowToFieldTransformer.cs
- PropertyGroupDescription.cs
- _UncName.cs
- SmtpDigestAuthenticationModule.cs
- InvalidEnumArgumentException.cs
- CuspData.cs
- ImageSourceValueSerializer.cs
- EventsTab.cs
- DesignerObject.cs
- GridViewDeletedEventArgs.cs
- DataServiceResponse.cs
- PeerUnsafeNativeCryptMethods.cs
- PointAnimationUsingKeyFrames.cs
- ContentType.cs
- XmlProcessingInstruction.cs
- ExtractCollection.cs
- TreeNodeStyleCollection.cs
- Aggregates.cs
- PageContent.cs
- ReadOnlyDictionary.cs
- ResXDataNode.cs
- MultilineStringConverter.cs
- StringUtil.cs
- DragDeltaEventArgs.cs
- InvokeHandlers.cs
- CodeDomExtensionMethods.cs
- ICollection.cs
- WebPartCollection.cs
- MarshalByRefObject.cs
- InputLanguageEventArgs.cs
- ThreadPoolTaskScheduler.cs
- CodeTryCatchFinallyStatement.cs
- DataServiceOperationContext.cs
- XmlSequenceWriter.cs
- StickyNoteAnnotations.cs
- OperationFormatUse.cs
- XamlHttpHandlerFactory.cs
- GlyphRunDrawing.cs
- ObjectItemCollection.cs
- EnumType.cs
- BehaviorEditorPart.cs
- querybuilder.cs
- XmlSignatureProperties.cs
- PngBitmapDecoder.cs
- FormViewCommandEventArgs.cs
- ZoomPercentageConverter.cs
- CharKeyFrameCollection.cs
- HttpClientCertificate.cs
- VectorAnimationUsingKeyFrames.cs
- FileAuthorizationModule.cs
- MultiByteCodec.cs
- NativeMethods.cs
- XmlImplementation.cs
- DataBoundLiteralControl.cs
- InvokeHandlers.cs
- DBCSCodePageEncoding.cs
- SqlDataSourceConfigureFilterForm.cs
- ResXResourceReader.cs
- RadioButtonPopupAdapter.cs
- ToolboxItemWrapper.cs
- MailAddressParser.cs
- DataControlFieldHeaderCell.cs
- GenericsNotImplementedException.cs
- StdValidatorsAndConverters.cs
- ToolStripPanelRenderEventArgs.cs
- DataSourceCacheDurationConverter.cs
- TextSelectionHelper.cs
- IntSecurity.cs
- Visual3D.cs
- Debug.cs
- NetNamedPipeSecurityElement.cs
- CurrencyWrapper.cs
- ObjectStateManager.cs
- UnsafeNativeMethods.cs
- DataGridViewCellLinkedList.cs
- NamespaceInfo.cs
- TreeViewEvent.cs
- DataGridViewCheckBoxColumn.cs
- ImageButton.cs
- DecryptRequest.cs
- BinaryUtilClasses.cs
- GridViewUpdateEventArgs.cs
- FunctionDescription.cs
- BypassElementCollection.cs
- InitializationEventAttribute.cs
- CqlIdentifiers.cs
- FormsAuthenticationTicket.cs
- EntityDataSourceContextCreatedEventArgs.cs
- WorkflowRuntimeServiceElement.cs
- InternalBase.cs
- CompilerScopeManager.cs
- SchemaConstraints.cs
- TextDecorationLocationValidation.cs
- SqlDataSourceRefreshSchemaForm.cs