Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Security / Cryptography / SHA384Cng.cs / 1305376 / SHA384Cng.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== using System; using System.Diagnostics.Contracts; namespace System.Security.Cryptography { ////// Wrapper around the BCrypt implementation of the SHA-384 hashing algorithm /// [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public sealed class SHA384Cng : SHA384 { private BCryptHashAlgorithm m_hashAlgorithm; //// [System.Security.SecurityCritical] public SHA384Cng() { Contract.Ensures(m_hashAlgorithm != null); m_hashAlgorithm = new BCryptHashAlgorithm(CngAlgorithm.Sha384, BCryptNative.ProviderName.MicrosoftPrimitiveProvider); } //// // [System.Security.SecurityCritical] protected override void Dispose(bool disposing) { try { if (disposing) { m_hashAlgorithm.Dispose(); } } finally { base.Dispose(disposing); } } //// // [System.Security.SecurityCritical] public override void Initialize() { Contract.Assert(m_hashAlgorithm != null); m_hashAlgorithm.Initialize(); } //// // [System.Security.SecurityCritical] protected override void HashCore(byte[] array, int ibStart, int cbSize) { Contract.Assert(m_hashAlgorithm != null); m_hashAlgorithm.HashCore(array, ibStart, cbSize); } //// // [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
- XPathAxisIterator.cs
- SoapIncludeAttribute.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- XDRSchema.cs
- CompletionCallbackWrapper.cs
- ProfileSection.cs
- DataBinder.cs
- RequestNavigateEventArgs.cs
- ImportRequest.cs
- Vector3dCollection.cs
- PersonalizationProviderHelper.cs
- HashHelper.cs
- Trigger.cs
- BaseValidator.cs
- FileSecurity.cs
- MenuItemCollectionEditorDialog.cs
- CounterSample.cs
- DetailsViewDeletedEventArgs.cs
- AmbientEnvironment.cs
- SymLanguageVendor.cs
- SoapAttributeAttribute.cs
- FixedBufferAttribute.cs
- COM2PropertyBuilderUITypeEditor.cs
- StorageInfo.cs
- AttributeParameterInfo.cs
- ResourceExpression.cs
- WindowsFormsHostAutomationPeer.cs
- WebPartManager.cs
- SqlParameter.cs
- AlphabeticalEnumConverter.cs
- BinaryFormatter.cs
- OpenFileDialog.cs
- PrimitiveCodeDomSerializer.cs
- DiscoveryEndpoint.cs
- ResourceDisplayNameAttribute.cs
- BevelBitmapEffect.cs
- ChangePassword.cs
- GridViewColumnCollectionChangedEventArgs.cs
- DataBindEngine.cs
- Content.cs
- IndexedString.cs
- IconHelper.cs
- UrlMappingCollection.cs
- MenuItemCollection.cs
- MemberHolder.cs
- DispatchWrapper.cs
- BatchParser.cs
- ObjectAssociationEndMapping.cs
- Slider.cs
- SafeNativeMethods.cs
- TemplateKeyConverter.cs
- NameService.cs
- WindowsEditBox.cs
- DataGridViewToolTip.cs
- DescendentsWalker.cs
- ProviderBase.cs
- PersonalizationStateInfo.cs
- XamlFilter.cs
- BitConverter.cs
- EncoderFallback.cs
- CommandID.cs
- OleDbConnection.cs
- TableLayoutRowStyleCollection.cs
- TableMethodGenerator.cs
- RemotingSurrogateSelector.cs
- FontConverter.cs
- COM2IPerPropertyBrowsingHandler.cs
- PackageStore.cs
- AddingNewEventArgs.cs
- TextElement.cs
- DisplayInformation.cs
- StringReader.cs
- WindowsContainer.cs
- MetricEntry.cs
- KnownColorTable.cs
- XmlNamespaceManager.cs
- XPathParser.cs
- updatecommandorderer.cs
- CompilerResults.cs
- Stroke2.cs
- Matrix.cs
- XamlTypeMapper.cs
- KeyGesture.cs
- IdleTimeoutMonitor.cs
- UniqueIdentifierService.cs
- UnsafeNativeMethods.cs
- FilterFactory.cs
- CustomErrorCollection.cs
- IriParsingElement.cs
- ExpressionCopier.cs
- MetadataArtifactLoaderCompositeFile.cs
- ObjectParameterCollection.cs
- XPathAxisIterator.cs
- HtmlShim.cs
- DurationConverter.cs
- SingleObjectCollection.cs
- RC2CryptoServiceProvider.cs
- ClientRuntimeConfig.cs
- ImageCodecInfoPrivate.cs
- TreeNodeSelectionProcessor.cs