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
- ProvideValueServiceProvider.cs
- CustomValidator.cs
- MenuRendererClassic.cs
- Empty.cs
- CodeGenerator.cs
- RoutedEvent.cs
- TopClause.cs
- SystemDropShadowChrome.cs
- MenuItemStyleCollection.cs
- DataServiceRequestException.cs
- Parameter.cs
- TreeNodeStyleCollectionEditor.cs
- Int32Storage.cs
- ContextStack.cs
- Cursors.cs
- cache.cs
- xmlglyphRunInfo.cs
- CodeCompileUnit.cs
- HostSecurityManager.cs
- FactoryId.cs
- HtmlTableRow.cs
- ObjectSecurity.cs
- OverflowException.cs
- DeclarationUpdate.cs
- EventProviderWriter.cs
- PropertyMapper.cs
- XmlLinkedNode.cs
- COAUTHIDENTITY.cs
- ThreadAttributes.cs
- LinkUtilities.cs
- TransportElement.cs
- InheritanceAttribute.cs
- SelectionListDesigner.cs
- NavigationPropertyEmitter.cs
- MessageDescription.cs
- SafeRightsManagementPubHandle.cs
- TextSegment.cs
- HandlerFactoryWrapper.cs
- NestedContainer.cs
- OutputChannel.cs
- Rect3D.cs
- ResumeStoryboard.cs
- ProxyElement.cs
- NameSpaceEvent.cs
- _HelperAsyncResults.cs
- _SslStream.cs
- UpDownBase.cs
- GenericTypeParameterBuilder.cs
- httpstaticobjectscollection.cs
- TransformCryptoHandle.cs
- IncrementalReadDecoders.cs
- DocumentSequence.cs
- DataException.cs
- ListViewDeleteEventArgs.cs
- XmlTypeAttribute.cs
- NativeMethods.cs
- OutputCacheProfile.cs
- AsyncPostBackTrigger.cs
- SpeechSynthesizer.cs
- CatalogUtil.cs
- DotExpr.cs
- FontFaceLayoutInfo.cs
- StringUtil.cs
- LowerCaseStringConverter.cs
- OrderedHashRepartitionStream.cs
- HotCommands.cs
- SendKeys.cs
- HttpDebugHandler.cs
- SweepDirectionValidation.cs
- ComponentCollection.cs
- TextTreeObjectNode.cs
- StringTraceRecord.cs
- BamlBinaryReader.cs
- ActivityInterfaces.cs
- IconConverter.cs
- Dynamic.cs
- SchemaAttDef.cs
- OperationInvokerTrace.cs
- DoubleLink.cs
- CodeArrayIndexerExpression.cs
- SecurityCriticalDataForSet.cs
- ItemsControl.cs
- MenuBase.cs
- ClientBuildManagerCallback.cs
- MobileTextWriter.cs
- TypeInfo.cs
- SoapEnvelopeProcessingElement.cs
- NullRuntimeConfig.cs
- ImageEditor.cs
- BitVector32.cs
- HTTP_SERVICE_CONFIG_URLACL_PARAM.cs
- DesignerImageAdapter.cs
- TargetControlTypeAttribute.cs
- log.cs
- Visitors.cs
- OpenTypeMethods.cs
- HashAlgorithm.cs
- ReachNamespaceInfo.cs
- HwndSourceKeyboardInputSite.cs
- sqlstateclientmanager.cs