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
- HandlerFactoryCache.cs
- WinFormsSpinner.cs
- DbConnectionPoolIdentity.cs
- EntityDataSourceState.cs
- PathSegmentCollection.cs
- TextEditorThreadLocalStore.cs
- DiscoveryClientReferences.cs
- _LazyAsyncResult.cs
- SqlVersion.cs
- CustomWebEventKey.cs
- GraphicsPathIterator.cs
- ObjectToken.cs
- WriteLineDesigner.xaml.cs
- XamlTypeMapper.cs
- AccessDataSource.cs
- Symbol.cs
- TableCellCollection.cs
- Overlapped.cs
- CheckBoxPopupAdapter.cs
- DbMetaDataFactory.cs
- XmlDocument.cs
- PropertyDescriptorCollection.cs
- ObjectDataSourceFilteringEventArgs.cs
- IResourceProvider.cs
- FileUtil.cs
- PointCollectionConverter.cs
- SqlUtil.cs
- DataGridItemAutomationPeer.cs
- FileDialogCustomPlace.cs
- DataGridItemAttachedStorage.cs
- InfoCardKeyedHashAlgorithm.cs
- DataBoundControlAdapter.cs
- Compilation.cs
- EventSetter.cs
- SecurityToken.cs
- MexServiceChannelBuilder.cs
- WebBrowser.cs
- SmiRequestExecutor.cs
- CryptoStream.cs
- DrawingGroup.cs
- FixedSOMLineCollection.cs
- RecognizerBase.cs
- ReplyChannel.cs
- TextRangeEditLists.cs
- CoTaskMemHandle.cs
- SendMailErrorEventArgs.cs
- DataGridViewSelectedCellCollection.cs
- HttpFileCollectionBase.cs
- ProviderConnectionPointCollection.cs
- RevocationPoint.cs
- LoginView.cs
- Bitmap.cs
- HttpRequestCacheValidator.cs
- GeneralTransform3DCollection.cs
- ChannelManager.cs
- ImageListImageEditor.cs
- Marshal.cs
- FileSystemInfo.cs
- ControlBuilder.cs
- UriTemplateMatchException.cs
- DataGrid.cs
- WindowsComboBox.cs
- UncommonField.cs
- ModelFunctionTypeElement.cs
- SerializationSectionGroup.cs
- BypassElementCollection.cs
- SortDescription.cs
- DirectionalLight.cs
- InputScopeAttribute.cs
- ZoneIdentityPermission.cs
- GrammarBuilderWildcard.cs
- DetailsViewDesigner.cs
- CheckBoxStandardAdapter.cs
- DocumentDesigner.cs
- ServiceDescriptionData.cs
- IgnorePropertiesAttribute.cs
- MissingFieldException.cs
- EmptyEnumerator.cs
- GlyphElement.cs
- SimpleMailWebEventProvider.cs
- NotCondition.cs
- SoapFormatter.cs
- HierarchicalDataSourceControl.cs
- TypeSystem.cs
- AsymmetricKeyExchangeFormatter.cs
- Form.cs
- UInt64.cs
- SoapCodeExporter.cs
- WeakEventTable.cs
- SwitchDesigner.xaml.cs
- KeyEventArgs.cs
- HttpCachePolicyElement.cs
- DataGrid.cs
- HandleRef.cs
- NonParentingControl.cs
- XPathNodeIterator.cs
- HotSpotCollection.cs
- Span.cs
- ErrorHandler.cs
- FixedDSBuilder.cs