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
- EntityDescriptor.cs
- WebPartConnectionsConnectVerb.cs
- EntityDataSourceDataSelection.cs
- Accessible.cs
- DecoderBestFitFallback.cs
- FacetDescriptionElement.cs
- FilterException.cs
- Underline.cs
- ZipIOExtraField.cs
- Figure.cs
- DownloadProgressEventArgs.cs
- RbTree.cs
- FixedSOMTableRow.cs
- InheritanceAttribute.cs
- NetPeerTcpBindingCollectionElement.cs
- LockRecursionException.cs
- DbConnectionPool.cs
- InstanceKeyNotReadyException.cs
- XmlSchemaSimpleType.cs
- SQLCharsStorage.cs
- HostedHttpContext.cs
- TrackBar.cs
- MimeMultiPart.cs
- DateBoldEvent.cs
- SystemColors.cs
- SharedUtils.cs
- HandledEventArgs.cs
- ArrangedElement.cs
- SkinBuilder.cs
- ButtonRenderer.cs
- DependencyProperty.cs
- IISMapPath.cs
- wgx_render.cs
- PageVisual.cs
- PtsHelper.cs
- ConfigurationStrings.cs
- DeploymentSectionCache.cs
- CodeNamespace.cs
- FontConverter.cs
- ByteStream.cs
- QueryRewriter.cs
- ReferentialConstraint.cs
- _StreamFramer.cs
- DataExpression.cs
- CombinedHttpChannel.cs
- ConditionBrowserDialog.cs
- UnsafeNativeMethods.cs
- DataSourceControl.cs
- TTSEngineTypes.cs
- ValidationErrorCollection.cs
- HwndProxyElementProvider.cs
- WriteableBitmap.cs
- Splitter.cs
- WindowsScrollBar.cs
- GestureRecognizer.cs
- CodeLabeledStatement.cs
- MobileUserControl.cs
- SqlNamer.cs
- ClipboardData.cs
- PropertyPathConverter.cs
- Char.cs
- WindowsGraphics2.cs
- DateTime.cs
- SystemIPInterfaceStatistics.cs
- RefreshEventArgs.cs
- EntityCommandCompilationException.cs
- PeerApplicationLaunchInfo.cs
- ResourcesBuildProvider.cs
- SafeNativeMethods.cs
- MatrixStack.cs
- SqlDeflator.cs
- X509Logo.cs
- UnauthorizedWebPart.cs
- ContentControl.cs
- XPathAncestorQuery.cs
- PagesChangedEventArgs.cs
- XamlParser.cs
- AsymmetricSignatureDeformatter.cs
- MissingManifestResourceException.cs
- DataGridAddNewRow.cs
- FormsAuthenticationUser.cs
- OciLobLocator.cs
- BamlMapTable.cs
- ShaperBuffers.cs
- FileUpload.cs
- ToolstripProfessionalRenderer.cs
- SqlSupersetValidator.cs
- ClientRuntimeConfig.cs
- CompleteWizardStep.cs
- CompoundFileDeflateTransform.cs
- WebHttpBehavior.cs
- VirtualPath.cs
- SqlDataAdapter.cs
- CompilationLock.cs
- wmiutil.cs
- ConsoleKeyInfo.cs
- Timer.cs
- CompilerWrapper.cs
- ThemeDictionaryExtension.cs
- ToolStripRenderer.cs