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
- XmlWriter.cs
- Scheduler.cs
- BindUriHelper.cs
- SharedDp.cs
- Base64Encoder.cs
- IsolatedStorageFilePermission.cs
- ClientFormsAuthenticationCredentials.cs
- NotFiniteNumberException.cs
- HtmlForm.cs
- Int16.cs
- SecurityHelper.cs
- ActivityBindForm.cs
- ItemContainerGenerator.cs
- GPRECT.cs
- CredentialSelector.cs
- FixedLineResult.cs
- LineMetrics.cs
- ToolStripContentPanelRenderEventArgs.cs
- CompositeDataBoundControl.cs
- BaseParaClient.cs
- GeometryValueSerializer.cs
- DataGridViewCheckBoxCell.cs
- ArrayConverter.cs
- HtmlInputControl.cs
- RequestedSignatureDialog.cs
- Buffer.cs
- RSAPKCS1SignatureDeformatter.cs
- DataTableCollection.cs
- WebMethodAttribute.cs
- ResolveCriteria.cs
- X509ThumbprintKeyIdentifierClause.cs
- MiniCustomAttributeInfo.cs
- Parser.cs
- StringInfo.cs
- wgx_commands.cs
- MenuAdapter.cs
- OutOfProcStateClientManager.cs
- FileInfo.cs
- FocusTracker.cs
- CssStyleCollection.cs
- BoundField.cs
- ClientUtils.cs
- DataMisalignedException.cs
- File.cs
- EnumMember.cs
- DependencyObjectProvider.cs
- StorageEntitySetMapping.cs
- WebPartDisplayModeEventArgs.cs
- ResourceSetExpression.cs
- HttpStreamXmlDictionaryReader.cs
- MethodCallTranslator.cs
- XmlSchemaProviderAttribute.cs
- PrimitiveSchema.cs
- Lasso.cs
- LazyTextWriterCreator.cs
- MaterialGroup.cs
- Axis.cs
- OleDbParameterCollection.cs
- _TransmitFileOverlappedAsyncResult.cs
- ProtectedProviderSettings.cs
- HtmlImage.cs
- ColumnResult.cs
- NamespaceImport.cs
- DetailsViewDeletedEventArgs.cs
- OracleConnection.cs
- Metafile.cs
- RenderTargetBitmap.cs
- ClassicBorderDecorator.cs
- SR.cs
- SymbolDocumentInfo.cs
- HtmlInputPassword.cs
- DragAssistanceManager.cs
- SafeHGlobalHandleCritical.cs
- DocumentApplicationDocumentViewer.cs
- ColumnTypeConverter.cs
- TemplatePropertyEntry.cs
- XPathNodeHelper.cs
- StringConcat.cs
- Object.cs
- FileRecordSequenceHelper.cs
- xmlsaver.cs
- WMICapabilities.cs
- PropertyNames.cs
- Soap12ServerProtocol.cs
- NonSerializedAttribute.cs
- TableAdapterManagerNameHandler.cs
- HtmlInputSubmit.cs
- XPathQueryGenerator.cs
- HScrollProperties.cs
- Process.cs
- UnicodeEncoding.cs
- AuthStoreRoleProvider.cs
- FileLevelControlBuilderAttribute.cs
- UserControlAutomationPeer.cs
- SAPICategories.cs
- PrintDialogDesigner.cs
- SupportedAddressingMode.cs
- MetaData.cs
- InfoCardArgumentException.cs
- IsolatedStorageFile.cs