Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Security / Cryptography / StrongNameSignatureInformation.cs / 1305376 / StrongNameSignatureInformation.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== using System; using System.Diagnostics; using System.Security.Cryptography; namespace System.Security.Cryptography { ////// Details about a strong name signature /// [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public sealed class StrongNameSignatureInformation { private SignatureVerificationResult m_verificationResult; private AsymmetricAlgorithm m_publicKey; // All strong name signatures use SHA1 as their hash algorithm private static readonly string StrongNameHashAlgorithm = CapiNative.GetAlgorithmName(CapiNative.AlgorithmId.Sha1); internal StrongNameSignatureInformation(AsymmetricAlgorithm publicKey) { Debug.Assert(publicKey != null, "publicKey != null"); m_verificationResult = SignatureVerificationResult.Valid; m_publicKey = publicKey; } internal StrongNameSignatureInformation(SignatureVerificationResult error) { Debug.Assert(error != SignatureVerificationResult.Valid, "error != SignatureVerificationResult.Valid"); m_verificationResult = error; } ////// Hash algorithm used in calculating the strong name signature /// public string HashAlgorithm { get { return StrongNameHashAlgorithm; } } ////// HRESULT version of the result code /// public int HResult { get { return CapiNative.HResultForVerificationResult(m_verificationResult); } } ////// Is the strong name signature valid, or was there some form of error /// public bool IsValid { get { return m_verificationResult == SignatureVerificationResult.Valid; } } ////// Public key used to create the signature /// public AsymmetricAlgorithm PublicKey { get { return m_publicKey; } } ////// Results of verifying the strong name signature /// public SignatureVerificationResult VerificationResult { get { return m_verificationResult; } } } } // 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
- CacheDict.cs
- RealProxy.cs
- TextServicesCompartmentContext.cs
- AppDomainFactory.cs
- BindingManagerDataErrorEventArgs.cs
- BlockUIContainer.cs
- _ScatterGatherBuffers.cs
- EntityDataSourceMemberPath.cs
- SystemColors.cs
- CodeCatchClause.cs
- BridgeDataReader.cs
- QueryCursorEventArgs.cs
- DesignerCategoryAttribute.cs
- ControlPager.cs
- BamlReader.cs
- PropertyGeneratedEventArgs.cs
- Stackframe.cs
- TemplateBuilder.cs
- WorkBatch.cs
- DragEventArgs.cs
- BaseCodeDomTreeGenerator.cs
- HtmlContainerControl.cs
- PseudoWebRequest.cs
- WbmpConverter.cs
- DataServiceResponse.cs
- DataServiceKeyAttribute.cs
- RoutedEventConverter.cs
- MulticastOption.cs
- VisualTreeFlattener.cs
- TimeSpanStorage.cs
- KnownTypesProvider.cs
- WebPartMenu.cs
- SqlGatherProducedAliases.cs
- Ipv6Element.cs
- UpdateException.cs
- MDIClient.cs
- TextDecorationLocationValidation.cs
- XmlWellformedWriter.cs
- LazyTextWriterCreator.cs
- CurrentTimeZone.cs
- PropertyManager.cs
- FastPropertyAccessor.cs
- SequenceFullException.cs
- Speller.cs
- ContainerFilterService.cs
- GenericEnumerator.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- HttpCachePolicyWrapper.cs
- Part.cs
- HttpFileCollection.cs
- ActiveXContainer.cs
- LineServicesRun.cs
- IsolatedStorageFile.cs
- MimePart.cs
- StringExpressionSet.cs
- StartUpEventArgs.cs
- _AuthenticationState.cs
- HandlerMappingMemo.cs
- ObjectQuery.cs
- ListMarkerSourceInfo.cs
- UnsafeNetInfoNativeMethods.cs
- ZeroOpNode.cs
- ScriptReferenceEventArgs.cs
- ControlBindingsConverter.cs
- DataGridView.cs
- ClipboardProcessor.cs
- SecureEnvironment.cs
- Nullable.cs
- StylusPlugin.cs
- TextPointerBase.cs
- DataTableMapping.cs
- SafeSecurityHelper.cs
- StateBag.cs
- ConfigurationSettings.cs
- SamlSubject.cs
- PageClientProxyGenerator.cs
- PagerStyle.cs
- ContainerParagraph.cs
- ToolboxCategory.cs
- ProviderException.cs
- IOException.cs
- SqlTrackingService.cs
- WindowsAltTab.cs
- ClientSettings.cs
- Itemizer.cs
- IDReferencePropertyAttribute.cs
- TemplateBindingExtension.cs
- COM2TypeInfoProcessor.cs
- ProgressChangedEventArgs.cs
- odbcmetadatacollectionnames.cs
- TextOnlyOutput.cs
- Mutex.cs
- ListControl.cs
- AlphaSortedEnumConverter.cs
- GridViewRowCollection.cs
- AxWrapperGen.cs
- ReaderWriterLockWrapper.cs
- InvalidAsynchronousStateException.cs
- PeerName.cs
- HwndSource.cs