Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Security / Cryptography / DSASignatureDeformatter.cs / 1 / DSASignatureDeformatter.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // DSASignatureDeformatter.cs // namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public class DSASignatureDeformatter : AsymmetricSignatureDeformatter { DSA _dsaKey; // DSA Key value to do decrypt operation string _oid; // // public constructors // public DSASignatureDeformatter() { // The hash algorithm is always SHA1 _oid = CryptoConfig.MapNameToOID("SHA1"); } public DSASignatureDeformatter(AsymmetricAlgorithm key) : this() { if (key == null) throw new ArgumentNullException("key"); _dsaKey = (DSA) key; } // // public methods // public override void SetKey(AsymmetricAlgorithm key) { if (key == null) throw new ArgumentNullException("key"); _dsaKey = (DSA) key; } public override void SetHashAlgorithm(string strName) { if (CryptoConfig.MapNameToOID(strName) != _oid) throw new CryptographicUnexpectedOperationException(Environment.GetResourceString("Cryptography_InvalidOperation")); } public override bool VerifySignature(byte[] rgbHash, byte[] rgbSignature) { if (_dsaKey == null) throw new CryptographicUnexpectedOperationException(Environment.GetResourceString("Cryptography_MissingKey")); if (rgbHash == null) throw new ArgumentNullException("rgbHash"); if (rgbSignature == null) throw new ArgumentNullException("rgbSignature"); return _dsaKey.VerifySignature(rgbHash, rgbSignature); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SQLMoney.cs
- BoundsDrawingContextWalker.cs
- UntrustedRecipientException.cs
- GroupDescription.cs
- TemplateControlBuildProvider.cs
- CodeTypeConstructor.cs
- categoryentry.cs
- ImageIndexConverter.cs
- glyphs.cs
- DocumentReferenceCollection.cs
- CreateUserWizardStep.cs
- MaterialGroup.cs
- Typography.cs
- ETagAttribute.cs
- VScrollProperties.cs
- XDeferredAxisSource.cs
- OdbcConnectionFactory.cs
- BitmapEffectOutputConnector.cs
- BindableAttribute.cs
- ForeignKeyFactory.cs
- StreamReader.cs
- Int64AnimationBase.cs
- Column.cs
- PtsHelper.cs
- WorkflowServiceHostFactory.cs
- OdbcError.cs
- DesignerAttribute.cs
- IDReferencePropertyAttribute.cs
- HttpWebRequestElement.cs
- TrackingProfileSerializer.cs
- FontConverter.cs
- Monitor.cs
- xmlsaver.cs
- formatter.cs
- PickDesigner.xaml.cs
- PriorityRange.cs
- LineBreakRecord.cs
- IProvider.cs
- TripleDESCryptoServiceProvider.cs
- RectangleHotSpot.cs
- ProxyManager.cs
- WorkflowServiceHostFactory.cs
- DotAtomReader.cs
- SmiSettersStream.cs
- DataGridViewCellParsingEventArgs.cs
- MergablePropertyAttribute.cs
- AvTraceDetails.cs
- UnitySerializationHolder.cs
- WhitespaceRule.cs
- WorkflowInstanceExtensionCollection.cs
- FigureHelper.cs
- ListViewPagedDataSource.cs
- StringStorage.cs
- GenericTypeParameterBuilder.cs
- ServiceModelConfigurationSectionCollection.cs
- ControlAdapter.cs
- SingleAnimationBase.cs
- GroupBoxRenderer.cs
- _RequestLifetimeSetter.cs
- DiscreteKeyFrames.cs
- ConversionContext.cs
- DictionaryGlobals.cs
- SubqueryRules.cs
- AuthenticationService.cs
- HitTestWithGeometryDrawingContextWalker.cs
- SystemEvents.cs
- Parser.cs
- ProviderSettingsCollection.cs
- Utils.cs
- ThreadSafeList.cs
- SecurityManager.cs
- Debug.cs
- EndEvent.cs
- FactoryId.cs
- LineServicesCallbacks.cs
- IIS7WorkerRequest.cs
- DirectionalLight.cs
- EdgeModeValidation.cs
- COAUTHIDENTITY.cs
- Substitution.cs
- HttpRawResponse.cs
- EndSelectCardRequest.cs
- DefinitionUpdate.cs
- OdbcConnectionString.cs
- ConditionalAttribute.cs
- PortCache.cs
- GeneralTransform3D.cs
- IfElseDesigner.xaml.cs
- RSACryptoServiceProvider.cs
- NumericUpDown.cs
- SqlCacheDependency.cs
- ObservableDictionary.cs
- InternalBufferManager.cs
- TextEditorTyping.cs
- SectionVisual.cs
- WizardForm.cs
- SchemaMapping.cs
- WeakHashtable.cs
- ImageBrush.cs
- XmlSchemaSimpleTypeUnion.cs