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
- ContainerFilterService.cs
- HtmlEncodedRawTextWriter.cs
- AuthenticateEventArgs.cs
- BatchServiceHost.cs
- EventSetter.cs
- PropertyTabChangedEvent.cs
- DigestComparer.cs
- ProxyManager.cs
- Crypto.cs
- ComponentChangingEvent.cs
- Typeface.cs
- UnmanagedMemoryStream.cs
- IndexOutOfRangeException.cs
- NavigationHelper.cs
- ConnectionStringSettingsCollection.cs
- TabItemAutomationPeer.cs
- UpdatePanelTrigger.cs
- ChangeConflicts.cs
- HTMLTagNameToTypeMapper.cs
- DictionaryManager.cs
- ClientRoleProvider.cs
- OutputCacheSettingsSection.cs
- DesignerContextDescriptor.cs
- DataKeyPropertyAttribute.cs
- DriveInfo.cs
- GeneralTransformCollection.cs
- TextContainer.cs
- DesigntimeLicenseContext.cs
- IItemProperties.cs
- DataGridCaption.cs
- SQLMembershipProvider.cs
- FunctionDescription.cs
- SizeF.cs
- BaseHashHelper.cs
- MimeMultiPart.cs
- XmlArrayItemAttributes.cs
- ItemMap.cs
- HtmlInputRadioButton.cs
- HttpDebugHandler.cs
- ColorTransform.cs
- X509CertificateClaimSet.cs
- returneventsaver.cs
- XmlRawWriterWrapper.cs
- X509WindowsSecurityToken.cs
- DispatchOperation.cs
- DataException.cs
- CqlParser.cs
- DbConnectionPoolGroupProviderInfo.cs
- ConnectionPointCookie.cs
- Animatable.cs
- OracleString.cs
- DataConnectionHelper.cs
- XmlDataDocument.cs
- DesignerOptionService.cs
- LogEntrySerializer.cs
- OdbcEnvironment.cs
- StatusBarDrawItemEvent.cs
- SoapExtension.cs
- ServiceRouteHandler.cs
- ConfigurationHelpers.cs
- SchemaHelper.cs
- DataRowExtensions.cs
- XmlEntity.cs
- SelectedGridItemChangedEvent.cs
- FixedSOMSemanticBox.cs
- DesigntimeLicenseContext.cs
- Command.cs
- FamilyTypefaceCollection.cs
- SwitchLevelAttribute.cs
- dbdatarecord.cs
- ProviderSettingsCollection.cs
- OpCodes.cs
- StructuredType.cs
- OleDbEnumerator.cs
- SystemIPGlobalStatistics.cs
- DBAsyncResult.cs
- PropertyPathConverter.cs
- ellipse.cs
- ToolStripHighContrastRenderer.cs
- ImageKeyConverter.cs
- DropShadowEffect.cs
- EventLogPermissionEntryCollection.cs
- ExceptionHandlersDesigner.cs
- Configuration.cs
- ReservationCollection.cs
- WmlValidatorAdapter.cs
- MsmqBindingMonitor.cs
- OrthographicCamera.cs
- FileSystemEventArgs.cs
- coordinator.cs
- XmlWellformedWriterHelpers.cs
- Parameter.cs
- ListViewDesigner.cs
- HttpHandlersSection.cs
- MenuStrip.cs
- DefaultMemberAttribute.cs
- HttpHandlerAction.cs
- FileDialog.cs
- SoapClientMessage.cs
- CodeComment.cs