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
- Variant.cs
- SaveFileDialog.cs
- DataContractJsonSerializer.cs
- SqlParameter.cs
- ClockGroup.cs
- ClientScriptManager.cs
- UInt64Storage.cs
- ReturnType.cs
- RadioButtonRenderer.cs
- SafeCryptoHandles.cs
- SecuritySessionFilter.cs
- CookieHandler.cs
- StackBuilderSink.cs
- XmlSchemaSubstitutionGroup.cs
- ConfigurationElementCollection.cs
- BitmapEffectvisualstate.cs
- EntityClassGenerator.cs
- ClientBuildManagerCallback.cs
- Accessible.cs
- MasterPage.cs
- ErrorWrapper.cs
- SectionRecord.cs
- OrthographicCamera.cs
- ZipIOExtraFieldPaddingElement.cs
- Inflater.cs
- ValueProviderWrapper.cs
- Semaphore.cs
- ButtonFieldBase.cs
- User.cs
- Console.cs
- HttpCapabilitiesEvaluator.cs
- Validator.cs
- CodeBlockBuilder.cs
- CommandEventArgs.cs
- DataGridSortingEventArgs.cs
- NegotiationTokenAuthenticatorState.cs
- FlowDocumentScrollViewer.cs
- Unit.cs
- BulletChrome.cs
- ParameterToken.cs
- Validator.cs
- AssemblyBuilder.cs
- SimpleMailWebEventProvider.cs
- ClientSession.cs
- unsafenativemethodsother.cs
- DataGridViewRow.cs
- ClassicBorderDecorator.cs
- ScriptingProfileServiceSection.cs
- SqlCacheDependency.cs
- XmlWriter.cs
- SqlGatherProducedAliases.cs
- DSASignatureFormatter.cs
- RequestDescription.cs
- Canvas.cs
- MediaPlayer.cs
- EFColumnProvider.cs
- ProvideValueServiceProvider.cs
- MD5CryptoServiceProvider.cs
- MemberInfoSerializationHolder.cs
- Compiler.cs
- AgileSafeNativeMemoryHandle.cs
- ZipIOFileItemStream.cs
- AutomationProperties.cs
- AuthorizationContext.cs
- XmlQueryType.cs
- SymLanguageType.cs
- ScrollProperties.cs
- RegexGroupCollection.cs
- LinkUtilities.cs
- XamlToRtfParser.cs
- SafeNativeMethodsMilCoreApi.cs
- SqlUserDefinedAggregateAttribute.cs
- AttachmentService.cs
- QilList.cs
- UnsafeNativeMethods.cs
- PropertyManager.cs
- PageCodeDomTreeGenerator.cs
- EarlyBoundInfo.cs
- HeaderCollection.cs
- GenericWebPart.cs
- HttpContextBase.cs
- WmlMobileTextWriter.cs
- ServicePoint.cs
- GridEntryCollection.cs
- CodeFieldReferenceExpression.cs
- WindowsEditBox.cs
- DataSourceView.cs
- HostUtils.cs
- ExtentCqlBlock.cs
- TypeProvider.cs
- ImplicitInputBrush.cs
- CreateUserWizardAutoFormat.cs
- ProfileSettingsCollection.cs
- XmlNode.cs
- ApplicationDirectoryMembershipCondition.cs
- oledbmetadatacollectionnames.cs
- ZipIOExtraField.cs
- OdbcEnvironment.cs
- Double.cs
- VariantWrapper.cs