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
- XmlAnyElementAttributes.cs
- CompiledQuery.cs
- EffectiveValueEntry.cs
- ResourceDictionary.cs
- EncryptedPackage.cs
- MaterialGroup.cs
- ErrorProvider.cs
- PageAsyncTask.cs
- BrushConverter.cs
- PrintPageEvent.cs
- DataColumnMappingCollection.cs
- FontDriver.cs
- ProfileInfo.cs
- XmlParserContext.cs
- CmsInterop.cs
- TextRunProperties.cs
- DropDownButton.cs
- AdornerPresentationContext.cs
- GetLedgerRequest.cs
- MaskInputRejectedEventArgs.cs
- DPAPIProtectedConfigurationProvider.cs
- CodeVariableReferenceExpression.cs
- PrintDialog.cs
- SystemResourceHost.cs
- CompleteWizardStep.cs
- ToolStripItem.cs
- OperationContextScope.cs
- ArraySegment.cs
- NotCondition.cs
- OleDbSchemaGuid.cs
- IgnoreFileBuildProvider.cs
- ContainerVisual.cs
- IsolatedStorageFile.cs
- KnownTypesHelper.cs
- CompiledRegexRunner.cs
- TreeView.cs
- Stack.cs
- PerformanceCountersElement.cs
- AssemblyInfo.cs
- DateTimeOffset.cs
- SimpleMailWebEventProvider.cs
- IDQuery.cs
- WebBrowserSiteBase.cs
- ConnectionInterfaceCollection.cs
- SQLSingle.cs
- OleDbMetaDataFactory.cs
- Base64Encoding.cs
- ObfuscationAttribute.cs
- BitmapEffect.cs
- SHA384Managed.cs
- PageCache.cs
- AncillaryOps.cs
- Parser.cs
- Translator.cs
- ToolStripSettings.cs
- AttachmentCollection.cs
- SqlLiftWhereClauses.cs
- ButtonFlatAdapter.cs
- MemoryRecordBuffer.cs
- ControlValuePropertyAttribute.cs
- ReadingWritingEntityEventArgs.cs
- CodeTypeParameterCollection.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- Sql8ExpressionRewriter.cs
- SubclassTypeValidatorAttribute.cs
- PrintPreviewDialog.cs
- Message.cs
- ExpressionConverter.cs
- ProfileGroupSettings.cs
- DataGridViewColumnHeaderCell.cs
- DataGridViewRowPostPaintEventArgs.cs
- ExpressionWriter.cs
- VectorAnimationUsingKeyFrames.cs
- Queue.cs
- FilterableAttribute.cs
- COM2ExtendedUITypeEditor.cs
- _LoggingObject.cs
- LineBreak.cs
- ControlPaint.cs
- AssemblyInfo.cs
- _ConnectStream.cs
- DataPointer.cs
- VersionValidator.cs
- FormatVersion.cs
- HandlerBase.cs
- messageonlyhwndwrapper.cs
- ArgumentOutOfRangeException.cs
- ListenDesigner.cs
- RuntimeHandles.cs
- IndexedString.cs
- ChildDocumentBlock.cs
- DataReaderContainer.cs
- DataGridRowClipboardEventArgs.cs
- QueryableDataSourceEditData.cs
- HelpInfo.cs
- XamlToRtfWriter.cs
- Parsers.cs
- RoleBoolean.cs
- HttpHandlerAction.cs
- TreeNodeCollection.cs