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
- ToolStripItemImageRenderEventArgs.cs
- DigitShape.cs
- DataKey.cs
- GridViewCommandEventArgs.cs
- ipaddressinformationcollection.cs
- SQLDateTimeStorage.cs
- ConfigurationSchemaErrors.cs
- CodeDomSerializerBase.cs
- FrameSecurityDescriptor.cs
- RequestCachePolicyConverter.cs
- TreeBuilder.cs
- ServiceBusyException.cs
- NCryptNative.cs
- Binding.cs
- XmlLanguageConverter.cs
- XPathSingletonIterator.cs
- HttpContext.cs
- ColumnMapProcessor.cs
- SecurityChannelListener.cs
- DrawingVisual.cs
- BoundField.cs
- WorkflowPersistenceService.cs
- EntityConnectionStringBuilderItem.cs
- MailMessage.cs
- FormViewInsertedEventArgs.cs
- XamlPointCollectionSerializer.cs
- OracleCommandSet.cs
- DictionaryCustomTypeDescriptor.cs
- ListDictionaryInternal.cs
- LoginCancelEventArgs.cs
- OledbConnectionStringbuilder.cs
- HTMLTextWriter.cs
- ServiceNameCollection.cs
- MimeFormatter.cs
- HttpInputStream.cs
- QueryContinueDragEventArgs.cs
- HandledMouseEvent.cs
- coordinatorscratchpad.cs
- SqlDependencyListener.cs
- DataSetMappper.cs
- GridItemPattern.cs
- RedistVersionInfo.cs
- CharacterString.cs
- XmlNavigatorFilter.cs
- WpfKnownTypeInvoker.cs
- PropertyValue.cs
- VectorAnimationBase.cs
- StrokeNodeOperations.cs
- DataExpression.cs
- HttpListenerPrefixCollection.cs
- DataDocumentXPathNavigator.cs
- StrongNamePublicKeyBlob.cs
- UpDownEvent.cs
- ToolStripRenderer.cs
- IxmlLineInfo.cs
- DataTemplateKey.cs
- CustomCategoryAttribute.cs
- COM2ColorConverter.cs
- WriteFileContext.cs
- RepeaterCommandEventArgs.cs
- ImageButton.cs
- ProtocolReflector.cs
- QualifiedCellIdBoolean.cs
- DispatchWrapper.cs
- StandardToolWindows.cs
- ConfigurationManagerInternalFactory.cs
- FormDesigner.cs
- URLBuilder.cs
- XmlArrayItemAttribute.cs
- SessionStateModule.cs
- SByteConverter.cs
- _ListenerAsyncResult.cs
- EntityTemplateUserControl.cs
- AssertFilter.cs
- CmsInterop.cs
- SimpleFileLog.cs
- DataPagerFieldCommandEventArgs.cs
- SerializerDescriptor.cs
- TdsParserStateObject.cs
- xmlsaver.cs
- ServiceContractGenerator.cs
- Screen.cs
- LocalizableResourceBuilder.cs
- HtmlShimManager.cs
- DataMember.cs
- UpdatePanelControlTrigger.cs
- TraceSection.cs
- ParameterCollection.cs
- WindowInteropHelper.cs
- FixedTextContainer.cs
- MimeXmlImporter.cs
- ToolStripLocationCancelEventArgs.cs
- ProxyAttribute.cs
- TdsParserSessionPool.cs
- CompositeControlDesigner.cs
- DbConnectionStringBuilder.cs
- SpellerError.cs
- FloaterBaseParagraph.cs
- SizeIndependentAnimationStorage.cs
- SizeAnimationUsingKeyFrames.cs