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
- OleDbStruct.cs
- TableLayoutStyleCollection.cs
- SizeF.cs
- IndexingContentUnit.cs
- LogAppendAsyncResult.cs
- PersonalizationState.cs
- UnknownWrapper.cs
- ConfigXmlText.cs
- FileUtil.cs
- DockingAttribute.cs
- ModelServiceImpl.cs
- ImportCatalogPart.cs
- EntityDataSourceWizardForm.cs
- PackagePart.cs
- MessageBox.cs
- BoolLiteral.cs
- InvalidCastException.cs
- DataAdapter.cs
- Ipv6Element.cs
- KeyInstance.cs
- _NestedMultipleAsyncResult.cs
- Selection.cs
- RequestNavigateEventArgs.cs
- CodeMemberMethod.cs
- ScriptControl.cs
- storepermission.cs
- Matrix3DValueSerializer.cs
- ObjectDataSourceDisposingEventArgs.cs
- TagNameToTypeMapper.cs
- shaperfactoryquerycacheentry.cs
- CrossContextChannel.cs
- CachedFontFamily.cs
- HyperLink.cs
- SafeBitVector32.cs
- DrawingContextDrawingContextWalker.cs
- SchemaImporter.cs
- RichTextBox.cs
- ReceiveContent.cs
- XsltSettings.cs
- GeometryGroup.cs
- ValidatedControlConverter.cs
- SHA512Managed.cs
- Funcletizer.cs
- _Events.cs
- ThrowHelper.cs
- ComboBox.cs
- ApplicationBuildProvider.cs
- OracleInternalConnection.cs
- DatatypeImplementation.cs
- OdbcHandle.cs
- LocalizabilityAttribute.cs
- WebServiceResponseDesigner.cs
- FileClassifier.cs
- PropertyItem.cs
- RequestStatusBarUpdateEventArgs.cs
- FileUtil.cs
- ApplicationHost.cs
- DoubleAnimationClockResource.cs
- HostingPreferredMapPath.cs
- TdsValueSetter.cs
- RemoveStoryboard.cs
- FrameworkContentElement.cs
- ToolStripLocationCancelEventArgs.cs
- ComboBoxRenderer.cs
- TransformGroup.cs
- WriterOutput.cs
- MouseDevice.cs
- FileDialog_Vista_Interop.cs
- XsdValidatingReader.cs
- SpecularMaterial.cs
- SchemaTableColumn.cs
- RegisterResponseInfo.cs
- PropertiesTab.cs
- TextUtf8RawTextWriter.cs
- HandledMouseEvent.cs
- ParallelTimeline.cs
- ExtensionQuery.cs
- RC2CryptoServiceProvider.cs
- counter.cs
- XPathDocumentBuilder.cs
- OrderedDictionaryStateHelper.cs
- ProvidePropertyAttribute.cs
- DataObjectAttribute.cs
- DebuggerService.cs
- WebPartConnectionsDisconnectVerb.cs
- PassportIdentity.cs
- IpcClientChannel.cs
- ContentPlaceHolder.cs
- ThreadLocal.cs
- PolyLineSegment.cs
- CallTemplateAction.cs
- MsmqBindingElementBase.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- SqlCharStream.cs
- CheckedPointers.cs
- SiteOfOriginContainer.cs
- EventLogEntry.cs
- StringConcat.cs
- ToolboxComponentsCreatingEventArgs.cs
- WebBrowserBase.cs