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
- DurableInstanceManager.cs
- Canonicalizers.cs
- AssertSection.cs
- ipaddressinformationcollection.cs
- RuleSettings.cs
- ExtentKey.cs
- RoutedUICommand.cs
- SmiGettersStream.cs
- HelpOperationInvoker.cs
- PageCodeDomTreeGenerator.cs
- ByteFacetDescriptionElement.cs
- SmtpReplyReaderFactory.cs
- CompiledQueryCacheKey.cs
- dsa.cs
- XamlVector3DCollectionSerializer.cs
- IndexerNameAttribute.cs
- HtmlLink.cs
- GatewayIPAddressInformationCollection.cs
- CryptoApi.cs
- FixedSOMPageElement.cs
- AdRotator.cs
- MimeBasePart.cs
- CancellableEnumerable.cs
- WebPartCloseVerb.cs
- BufferedOutputStream.cs
- MtomMessageEncoder.cs
- Closure.cs
- TextLineResult.cs
- SchemaImporterExtensionsSection.cs
- EventBuilder.cs
- ProviderIncompatibleException.cs
- ResourceDefaultValueAttribute.cs
- SafeCoTaskMem.cs
- EventSetter.cs
- NonParentingControl.cs
- FunctionQuery.cs
- CodePropertyReferenceExpression.cs
- EventData.cs
- TypeSource.cs
- FixedBufferAttribute.cs
- CodePropertyReferenceExpression.cs
- DataBindEngine.cs
- TextSpan.cs
- RegexReplacement.cs
- FileFormatException.cs
- XmlSchemaNotation.cs
- ActivityCompletionCallbackWrapper.cs
- Evidence.cs
- Constants.cs
- versioninfo.cs
- FontEmbeddingManager.cs
- DbException.cs
- Selection.cs
- CallbackTimeoutsBehavior.cs
- XamlReaderHelper.cs
- AddInDeploymentState.cs
- ProcessModelInfo.cs
- CompilerParameters.cs
- RecognitionEventArgs.cs
- DateBoldEvent.cs
- ChunkedMemoryStream.cs
- ResourceAssociationType.cs
- LinkConverter.cs
- FormsAuthenticationCredentials.cs
- DeclarativeExpressionConditionDeclaration.cs
- XamlTreeBuilderBamlRecordWriter.cs
- BinaryParser.cs
- BaseResourcesBuildProvider.cs
- PrintController.cs
- DesignerVerb.cs
- FloaterBaseParaClient.cs
- LineSegment.cs
- RectAnimationClockResource.cs
- SchemaElementDecl.cs
- Matrix3DValueSerializer.cs
- SplitterDesigner.cs
- SqlTrackingQuery.cs
- GlobalEventManager.cs
- TogglePattern.cs
- ActivityValidator.cs
- XmlElement.cs
- SetStoryboardSpeedRatio.cs
- CustomAttributeSerializer.cs
- SoapEnumAttribute.cs
- FigureParagraph.cs
- LifetimeServices.cs
- SqlRewriteScalarSubqueries.cs
- TranslateTransform3D.cs
- WebPartConnectionsDisconnectVerb.cs
- TextEditorTables.cs
- SiteMapProvider.cs
- SapiRecoInterop.cs
- XpsFilter.cs
- DataDocumentXPathNavigator.cs
- XmlILAnnotation.cs
- DataGridColumnStyleMappingNameEditor.cs
- DataGridRowsPresenter.cs
- AggregatePushdown.cs
- FormViewUpdateEventArgs.cs
- WebPartVerbCollection.cs