Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Security / Cryptography / SHA512CryptoServiceProvider.cs / 1305376 / SHA512CryptoServiceProvider.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== using System; using System.Diagnostics.Contracts; namespace System.Security.Cryptography { ////// Wrapper around the CAPI implementation of the SHA-512 hashing algorithm /// [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public sealed class SHA512CryptoServiceProvider : SHA512 { private CapiHashAlgorithm m_hashAlgorithm; //// [System.Security.SecurityCritical] public SHA512CryptoServiceProvider() { Contract.Ensures(m_hashAlgorithm != null); m_hashAlgorithm = new CapiHashAlgorithm(CapiNative.ProviderNames.MicrosoftEnhancedRsaAes, CapiNative.ProviderType.RsaAes, CapiNative.AlgorithmId.Sha512); } //// // [System.Security.SecurityCritical] protected override void Dispose(bool disposing) { try { if (disposing) { m_hashAlgorithm.Dispose(); } } finally { base.Dispose(disposing); } } ///// /// Reset the hash algorithm to begin hashing a new set of data /// //// [System.Security.SecurityCritical] public override void Initialize() { Contract.Assert(m_hashAlgorithm != null); m_hashAlgorithm.Initialize(); } ///// /// Hash a block of data /// //// [System.Security.SecurityCritical] protected override void HashCore(byte[] array, int ibStart, int cbSize) { Contract.Assert(m_hashAlgorithm != null); m_hashAlgorithm.HashCore(array, ibStart, cbSize); } ///// /// Complete the hash, returning its value /// //// [System.Security.SecurityCritical] protected override byte[] HashFinal() { Contract.Assert(m_hashAlgorithm != null); return m_hashAlgorithm.HashFinal(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.//
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- webclient.cs
- DesignerToolStripControlHost.cs
- SqlUserDefinedTypeAttribute.cs
- ScriptRegistrationManager.cs
- GlobalProxySelection.cs
- RegexRunnerFactory.cs
- WebFaultClientMessageInspector.cs
- ExclusiveTcpTransportManager.cs
- HttpListenerContext.cs
- Camera.cs
- ConnectionsZoneDesigner.cs
- RegistrationServices.cs
- HtmlHead.cs
- DataGridPageChangedEventArgs.cs
- AssemblyResourceLoader.cs
- SqlCrossApplyToCrossJoin.cs
- StringFormat.cs
- ZipIOCentralDirectoryBlock.cs
- HtmlValidationSummaryAdapter.cs
- EventManager.cs
- HttpRuntimeSection.cs
- FaultImportOptions.cs
- RegisteredArrayDeclaration.cs
- SchemaImporterExtensionElement.cs
- Permission.cs
- InternalTypeHelper.cs
- OleDbException.cs
- ResourceContainer.cs
- TypeDescriptor.cs
- LocationReferenceValue.cs
- SByte.cs
- DataGridCell.cs
- PersistenceTypeAttribute.cs
- OpCodes.cs
- EdmSchemaAttribute.cs
- LinearGradientBrush.cs
- Rect.cs
- BasicHttpBinding.cs
- Tablet.cs
- Tablet.cs
- CapabilitiesPattern.cs
- FtpWebRequest.cs
- SelectionEditor.cs
- DesignerDataRelationship.cs
- shaper.cs
- BindingOperations.cs
- ReflectEventDescriptor.cs
- ReflectionServiceProvider.cs
- SslSecurityTokenParameters.cs
- PackagingUtilities.cs
- MobileControlDesigner.cs
- Identifier.cs
- ReflectionTypeLoadException.cs
- Point.cs
- ToolStripDropDownClosingEventArgs.cs
- FormatterConverter.cs
- InternalRelationshipCollection.cs
- StyleSheetComponentEditor.cs
- StatusBarAutomationPeer.cs
- BitSet.cs
- SecurityContextSecurityToken.cs
- Image.cs
- SafeArrayRankMismatchException.cs
- PropertyPanel.cs
- CommentEmitter.cs
- ChildTable.cs
- SchemaInfo.cs
- Int64AnimationBase.cs
- ListViewItemEventArgs.cs
- GridViewEditEventArgs.cs
- HostSecurityManager.cs
- log.cs
- XmlNode.cs
- AccessDataSourceView.cs
- hresults.cs
- ModelChangedEventArgsImpl.cs
- WebPartTransformerCollection.cs
- SaveFileDialog.cs
- DBDataPermission.cs
- DBConcurrencyException.cs
- SizeF.cs
- UiaCoreApi.cs
- Int32Converter.cs
- coordinatorscratchpad.cs
- ExpanderAutomationPeer.cs
- InstanceView.cs
- ConfigurationCollectionAttribute.cs
- SafeRightsManagementPubHandle.cs
- ListControlDesigner.cs
- StringFormat.cs
- DiscoveryDocument.cs
- BreakSafeBase.cs
- TransformerTypeCollection.cs
- Certificate.cs
- SrgsElementFactoryCompiler.cs
- BitmapVisualManager.cs
- TimelineGroup.cs
- BindToObject.cs
- OleDbSchemaGuid.cs
- UshortList2.cs