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
- UpdatePanelTrigger.cs
- ToolStripItemClickedEventArgs.cs
- XmlNodeComparer.cs
- ConcurrentQueue.cs
- _ConnectOverlappedAsyncResult.cs
- PipelineModuleStepContainer.cs
- CardSpaceSelector.cs
- FixedPosition.cs
- TextServicesDisplayAttribute.cs
- SR.cs
- ReverseInheritProperty.cs
- MessageHeaderAttribute.cs
- WebPart.cs
- Attributes.cs
- SpellCheck.cs
- PageBreakRecord.cs
- TaiwanLunisolarCalendar.cs
- MetaChildrenColumn.cs
- Content.cs
- HighlightComponent.cs
- ExpandableObjectConverter.cs
- Parser.cs
- FreezableOperations.cs
- SimpleParser.cs
- WebBrowsableAttribute.cs
- DummyDataSource.cs
- AddInSegmentDirectoryNotFoundException.cs
- BigInt.cs
- SessionStateSection.cs
- DataComponentNameHandler.cs
- UserPreferenceChangedEventArgs.cs
- Serializer.cs
- ProgressBarHighlightConverter.cs
- IODescriptionAttribute.cs
- XmlSchemaSimpleTypeUnion.cs
- ValueType.cs
- Peer.cs
- HttpErrorTraceRecord.cs
- SubclassTypeValidator.cs
- HtmlInputPassword.cs
- WebServiceErrorEvent.cs
- DataServiceSaveChangesEventArgs.cs
- LayoutExceptionEventArgs.cs
- DependencyObjectType.cs
- Encoder.cs
- SelectionItemPattern.cs
- CachedPathData.cs
- SortQuery.cs
- PopOutPanel.cs
- FunctionMappingTranslator.cs
- AppAction.cs
- GlyphRunDrawing.cs
- PackWebRequestFactory.cs
- ItemsPresenter.cs
- IDictionary.cs
- SymbolDocumentInfo.cs
- SqlDataSourceView.cs
- ITextView.cs
- DiscoveryInnerClientManaged11.cs
- ClientEventManager.cs
- ParallelEnumerable.cs
- UserValidatedEventArgs.cs
- BoolExpression.cs
- ContainerFilterService.cs
- Renderer.cs
- InteropAutomationProvider.cs
- WebPartVerbCollection.cs
- KnownTypeAttribute.cs
- Vector3DConverter.cs
- KeyPressEvent.cs
- DataGridViewCellStyleConverter.cs
- XmlQueryType.cs
- Annotation.cs
- TransformCollection.cs
- PackagePartCollection.cs
- SingleSelectRootGridEntry.cs
- SHA256.cs
- RunClient.cs
- ExtendedPropertiesHandler.cs
- TypeReference.cs
- AsymmetricSignatureDeformatter.cs
- StateManagedCollection.cs
- UnmanagedHandle.cs
- TriggerBase.cs
- ConsumerConnectionPointCollection.cs
- Point.cs
- UnmanagedMemoryStream.cs
- AssociationTypeEmitter.cs
- CustomAssemblyResolver.cs
- Quaternion.cs
- ObjectDataSource.cs
- EntityDataSourceWrapper.cs
- SoapAttributeOverrides.cs
- SystemResourceHost.cs
- Size.cs
- LinkConverter.cs
- DatePicker.cs
- GridEntry.cs
- SecurityContext.cs
- DataGridViewColumnCollection.cs