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
- QuaternionAnimationBase.cs
- ExtensibleClassFactory.cs
- XNodeValidator.cs
- ParentQuery.cs
- DocumentSequenceHighlightLayer.cs
- Process.cs
- VScrollBar.cs
- FontStretch.cs
- XmlSortKey.cs
- EntityException.cs
- MobileRedirect.cs
- DataViewSettingCollection.cs
- NodeFunctions.cs
- ConstraintStruct.cs
- AtomParser.cs
- ExtractorMetadata.cs
- SizeConverter.cs
- nulltextnavigator.cs
- SimpleWorkerRequest.cs
- PassportIdentity.cs
- Html32TextWriter.cs
- ListGeneralPage.cs
- PtsCache.cs
- RulePatternOps.cs
- EmptyWithCancelationCheckWorkItem.cs
- DynamicHyperLink.cs
- GenericUriParser.cs
- FormViewUpdateEventArgs.cs
- PerformanceCounterPermissionEntry.cs
- PropertyRef.cs
- SequentialWorkflowHeaderFooter.cs
- MailSettingsSection.cs
- UInt64Converter.cs
- GridItemPattern.cs
- TCPListener.cs
- HostingEnvironmentException.cs
- IBuiltInEvidence.cs
- ServiceReference.cs
- SqlInfoMessageEvent.cs
- WindowsSlider.cs
- ClipboardProcessor.cs
- HtmlMeta.cs
- Certificate.cs
- RegexGroup.cs
- SoapRpcServiceAttribute.cs
- CompilerInfo.cs
- NamespaceDisplayAutomationPeer.cs
- LocalizationParserHooks.cs
- HttpGetServerProtocol.cs
- DoubleStorage.cs
- indexingfiltermarshaler.cs
- WebChannelFactory.cs
- CallContext.cs
- propertytag.cs
- TimeoutException.cs
- SerializationAttributes.cs
- ChineseLunisolarCalendar.cs
- ProtocolElementCollection.cs
- InteropEnvironment.cs
- IntellisenseTextBox.designer.cs
- FixedTextView.cs
- BindingUtils.cs
- SafeNativeMethodsMilCoreApi.cs
- EDesignUtil.cs
- LinqDataSourceView.cs
- TextRange.cs
- XmlRootAttribute.cs
- PublishLicense.cs
- RC2CryptoServiceProvider.cs
- XmlSchemaSimpleTypeUnion.cs
- ObfuscationAttribute.cs
- AliasedSlot.cs
- Types.cs
- recordstatescratchpad.cs
- HtmlElementCollection.cs
- ValueProviderWrapper.cs
- ClientProxyGenerator.cs
- OpacityConverter.cs
- COM2EnumConverter.cs
- QilSortKey.cs
- ResourceAssociationSetEnd.cs
- ErrorsHelper.cs
- VBIdentifierDesigner.xaml.cs
- DbConnectionPoolIdentity.cs
- EmbeddedMailObjectsCollection.cs
- TlsnegoTokenProvider.cs
- TransactionProtocol.cs
- TraceContext.cs
- EventWaitHandleSecurity.cs
- TextEditorThreadLocalStore.cs
- DataGridViewAutoSizeModeEventArgs.cs
- mediaclock.cs
- VectorKeyFrameCollection.cs
- AppSettingsExpressionBuilder.cs
- TextFormatterHost.cs
- DBDataPermission.cs
- EventlogProvider.cs
- MultiSelector.cs
- KeyboardDevice.cs
- ClientScriptManager.cs