Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Security / Cryptography / SHA384CryptoServiceProvider.cs / 1305376 / SHA384CryptoServiceProvider.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-384 hashing algorithm /// [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public sealed class SHA384CryptoServiceProvider : SHA384 { private CapiHashAlgorithm m_hashAlgorithm; //// [System.Security.SecurityCritical] public SHA384CryptoServiceProvider() { Contract.Ensures(m_hashAlgorithm != null); m_hashAlgorithm = new CapiHashAlgorithm(CapiNative.ProviderNames.MicrosoftEnhancedRsaAes, CapiNative.ProviderType.RsaAes, CapiNative.AlgorithmId.Sha384); } //// // [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
- TimeSpanConverter.cs
- ScrollChangedEventArgs.cs
- CompilerScopeManager.cs
- DataBinding.cs
- __ConsoleStream.cs
- HtmlHead.cs
- EntityContainerRelationshipSetEnd.cs
- XmlFormatExtensionPrefixAttribute.cs
- ClientSettingsStore.cs
- ServiceCredentials.cs
- ScrollBar.cs
- NativeMethods.cs
- Native.cs
- WpfPayload.cs
- HMAC.cs
- Set.cs
- BuildProvider.cs
- TextBox.cs
- SqlInternalConnectionSmi.cs
- HostedHttpRequestAsyncResult.cs
- TextBreakpoint.cs
- DispatcherObject.cs
- MD5HashHelper.cs
- ActiveDocumentEvent.cs
- ToolStripLocationCancelEventArgs.cs
- PersonalizationDictionary.cs
- ColumnMapProcessor.cs
- AsmxEndpointPickerExtension.cs
- Rules.cs
- TdsParserStaticMethods.cs
- DynamicDiscoveryDocument.cs
- streamingZipPartStream.cs
- PassportAuthentication.cs
- CheckPair.cs
- XmlEventCache.cs
- SaveFileDialog.cs
- TcpChannelListener.cs
- FloatUtil.cs
- WebHttpElement.cs
- LiteralControl.cs
- StoreItemCollection.Loader.cs
- DataGridViewImageColumn.cs
- _HeaderInfo.cs
- CompareInfo.cs
- XmlSchemaCollection.cs
- AccessorTable.cs
- HttpBrowserCapabilitiesBase.cs
- DiscoveryClientDocuments.cs
- ToolStripGripRenderEventArgs.cs
- FieldAccessException.cs
- FrameworkContextData.cs
- KnownTypesHelper.cs
- PeerNameRecordCollection.cs
- DocumentEventArgs.cs
- RoutedEventConverter.cs
- XmlSchemaSimpleContent.cs
- LogSwitch.cs
- CancellationToken.cs
- ViewKeyConstraint.cs
- OpenTypeLayoutCache.cs
- SafeProcessHandle.cs
- StateMachine.cs
- LinkTarget.cs
- PackagePartCollection.cs
- DataGridViewElement.cs
- WindowsSpinner.cs
- CodeObjectCreateExpression.cs
- FieldToken.cs
- Monitor.cs
- NativeMethods.cs
- HttpCacheVary.cs
- ValidatingReaderNodeData.cs
- CookieHandler.cs
- IntegrationExceptionEventArgs.cs
- FlowDocumentPaginator.cs
- Stack.cs
- ServiceOperation.cs
- TreeNode.cs
- SQLBytesStorage.cs
- WindowsImpersonationContext.cs
- HtmlInputReset.cs
- AbsoluteQuery.cs
- GridViewSelectEventArgs.cs
- GetCertificateRequest.cs
- ProjectionPath.cs
- DayRenderEvent.cs
- CmsInterop.cs
- HtmlForm.cs
- WebServiceTypeData.cs
- ProviderConnectionPoint.cs
- XmlSerializerAssemblyAttribute.cs
- CodeValidator.cs
- DrawingContext.cs
- ControlPaint.cs
- VSWCFServiceContractGenerator.cs
- TextEffect.cs
- CodeAttributeArgument.cs
- EntityClientCacheKey.cs
- JsonServiceDocumentSerializer.cs
- AlgoModule.cs