Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LinqDataSource.cs
- DataBoundControl.cs
- Stack.cs
- XmlReader.cs
- Pkcs7Recipient.cs
- ThousandthOfEmRealDoubles.cs
- DataGridToolTip.cs
- _SslSessionsCache.cs
- OperandQuery.cs
- MachineKey.cs
- MouseGestureValueSerializer.cs
- IIS7ConfigurationLoader.cs
- LocationChangedEventArgs.cs
- DataGridTable.cs
- TreeNodeConverter.cs
- ScrollItemPattern.cs
- PrtCap_Public.cs
- AutomationProperty.cs
- RadioButtonPopupAdapter.cs
- ApplicationFileCodeDomTreeGenerator.cs
- EntityProxyTypeInfo.cs
- DelegateTypeInfo.cs
- SystemIPv6InterfaceProperties.cs
- NetNamedPipeSecurity.cs
- AsmxEndpointPickerExtension.cs
- recordstate.cs
- SiteMapDataSource.cs
- TimeSpan.cs
- WindowsFormsLinkLabel.cs
- XslAstAnalyzer.cs
- BehaviorDragDropEventArgs.cs
- TreeNodeCollection.cs
- _AutoWebProxyScriptWrapper.cs
- EntityWithKeyStrategy.cs
- InvalidPrinterException.cs
- InkCanvas.cs
- ToolStripContainerActionList.cs
- OdbcTransaction.cs
- DBDataPermission.cs
- GeneralTransform3DTo2D.cs
- LogEntryUtils.cs
- FixedDocument.cs
- BitmapSource.cs
- ISFClipboardData.cs
- Propagator.ExtentPlaceholderCreator.cs
- AnnotationHighlightLayer.cs
- IsolationInterop.cs
- NamespaceMapping.cs
- CalendarDay.cs
- DataAdapter.cs
- TextProviderWrapper.cs
- XmlSchemaObjectCollection.cs
- InputLanguageEventArgs.cs
- ReflectionServiceProvider.cs
- SiteMapSection.cs
- DrawingVisualDrawingContext.cs
- Item.cs
- ConditionalDesigner.cs
- connectionpool.cs
- HyperLinkField.cs
- RectAnimationUsingKeyFrames.cs
- ThumbAutomationPeer.cs
- TemplateParser.cs
- GenericWebPart.cs
- GridViewItemAutomationPeer.cs
- StyleXamlTreeBuilder.cs
- ColorPalette.cs
- DecimalConstantAttribute.cs
- BitmapEffectInput.cs
- FrugalList.cs
- XamlBuildTaskServices.cs
- DesignerActionUIService.cs
- SourceInterpreter.cs
- METAHEADER.cs
- WebPartHeaderCloseVerb.cs
- EllipseGeometry.cs
- BinaryReader.cs
- XPathDocument.cs
- HMACSHA256.cs
- BlurEffect.cs
- ActivityDesigner.cs
- WhitespaceRuleLookup.cs
- ListViewEditEventArgs.cs
- PolyLineSegment.cs
- OleDbRowUpdatingEvent.cs
- ActiveXContainer.cs
- DictionaryCustomTypeDescriptor.cs
- TypeBinaryExpression.cs
- ControlBuilder.cs
- IndividualDeviceConfig.cs
- BinaryParser.cs
- TableRowGroupCollection.cs
- ImageSourceTypeConverter.cs
- BStrWrapper.cs
- WebPartManagerInternals.cs
- TextBoxBase.cs
- LogSwitch.cs
- Vector3DValueSerializer.cs
- Configuration.cs
- ErrorsHelper.cs