Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / AsymmetricSignatureFormatter.cs / 1305376 / AsymmetricSignatureFormatter.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
// [....]
//
//
// AsymmetricSignatureFormatter.cs
//
namespace System.Security.Cryptography {
using System;
using System.Diagnostics.Contracts;
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class AsymmetricSignatureFormatter {
//
// protected constructors
//
protected AsymmetricSignatureFormatter() {
}
//
// public methods
//
abstract public void SetKey(AsymmetricAlgorithm key);
abstract public void SetHashAlgorithm(String strName);
public virtual byte[] CreateSignature(HashAlgorithm hash) {
if (hash == null) throw new ArgumentNullException("hash");
Contract.EndContractBlock();
SetHashAlgorithm(hash.ToString());
return CreateSignature(hash.Hash);
}
abstract public byte[] CreateSignature(byte[] rgbHash);
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
// [....]
//
//
// AsymmetricSignatureFormatter.cs
//
namespace System.Security.Cryptography {
using System;
using System.Diagnostics.Contracts;
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class AsymmetricSignatureFormatter {
//
// protected constructors
//
protected AsymmetricSignatureFormatter() {
}
//
// public methods
//
abstract public void SetKey(AsymmetricAlgorithm key);
abstract public void SetHashAlgorithm(String strName);
public virtual byte[] CreateSignature(HashAlgorithm hash) {
if (hash == null) throw new ArgumentNullException("hash");
Contract.EndContractBlock();
SetHashAlgorithm(hash.ToString());
return CreateSignature(hash.Hash);
}
abstract public byte[] CreateSignature(byte[] rgbHash);
}
}
// 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
- PersistenceTypeAttribute.cs
- OraclePermission.cs
- SubstitutionList.cs
- ServiceChannelFactory.cs
- X509Extension.cs
- TypeBuilder.cs
- Int32Converter.cs
- CompilerParameters.cs
- MultiPageTextView.cs
- __FastResourceComparer.cs
- UncommonField.cs
- MimeObjectFactory.cs
- PartBasedPackageProperties.cs
- Pen.cs
- FontStretchConverter.cs
- OdbcStatementHandle.cs
- VolatileEnlistmentState.cs
- LostFocusEventManager.cs
- CssClassPropertyAttribute.cs
- MessageFilterTable.cs
- StringCollection.cs
- XD.cs
- AppDomainGrammarProxy.cs
- ToolStripItemClickedEventArgs.cs
- ZipIOCentralDirectoryBlock.cs
- NamespaceList.cs
- SchemaSetCompiler.cs
- CompositionAdorner.cs
- Queue.cs
- ActivityDesignerResources.cs
- Propagator.cs
- ReaderWriterLockWrapper.cs
- OneToOneMappingSerializer.cs
- CategoryNameCollection.cs
- MessageQueueKey.cs
- SafeNativeMethods.cs
- MobileCapabilities.cs
- DecoderFallback.cs
- IIS7WorkerRequest.cs
- AssociatedControlConverter.cs
- MissingMemberException.cs
- SyntaxCheck.cs
- CardSpaceException.cs
- ButtonBaseAutomationPeer.cs
- WorkflowServiceNamespace.cs
- AuthenticationSection.cs
- PostBackTrigger.cs
- AnchoredBlock.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- TabletDeviceInfo.cs
- FolderBrowserDialog.cs
- DeferrableContentConverter.cs
- HashCryptoHandle.cs
- RuleElement.cs
- LocatorPart.cs
- TraceUtils.cs
- SqlProcedureAttribute.cs
- NamedObject.cs
- BroadcastEventHelper.cs
- cookie.cs
- TraceUtility.cs
- TlsnegoTokenAuthenticator.cs
- ClassHandlersStore.cs
- FlagsAttribute.cs
- UrlMappingCollection.cs
- DocumentGridPage.cs
- NumberEdit.cs
- CompilerParameters.cs
- ContractComponent.cs
- GACIdentityPermission.cs
- XmlDigitalSignatureProcessor.cs
- TemplateBuilder.cs
- WebBrowserDocumentCompletedEventHandler.cs
- XpsFontSubsetter.cs
- HandlerBase.cs
- PersonalizablePropertyEntry.cs
- SessionPageStatePersister.cs
- PipeConnection.cs
- RecognizedWordUnit.cs
- SrgsSemanticInterpretationTag.cs
- SplineQuaternionKeyFrame.cs
- SchemaCollectionCompiler.cs
- ItemAutomationPeer.cs
- User.cs
- ResourcePermissionBaseEntry.cs
- ConfigXmlDocument.cs
- WinEventHandler.cs
- ConfigXmlText.cs
- TraceSwitch.cs
- LockedAssemblyCache.cs
- IssuedTokenParametersEndpointAddressElement.cs
- MD5CryptoServiceProvider.cs
- EditingCoordinator.cs
- Parameter.cs
- _Win32.cs
- autovalidator.cs
- DataGridViewBand.cs
- HitTestParameters.cs
- SiteMapNodeItem.cs
- ThemeDirectoryCompiler.cs