Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Security / Cryptography / RSAOAEPKeyExchangeDeformatter.cs / 1 / RSAOAEPKeyExchangeDeformatter.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public class RSAOAEPKeyExchangeDeformatter : AsymmetricKeyExchangeDeformatter { private RSA _rsaKey; // RSA Key value to do decrypt operation // // public constructors // public RSAOAEPKeyExchangeDeformatter() {} public RSAOAEPKeyExchangeDeformatter(AsymmetricAlgorithm key) { if (key == null) throw new ArgumentNullException("key"); _rsaKey = (RSA) key; } // // public properties // public override String Parameters { get { return null; } set { ; } } // // public methods // public override byte[] DecryptKeyExchange(byte[] rgbData) { if (_rsaKey == null) throw new CryptographicUnexpectedOperationException(Environment.GetResourceString("Cryptography_MissingKey")); if (_rsaKey is RSACryptoServiceProvider) { return ((RSACryptoServiceProvider) _rsaKey).Decrypt(rgbData, true); } else { return Utils.RsaOaepDecrypt(_rsaKey, SHA1.Create(), new PKCS1MaskGenerationMethod(), rgbData); } } public override void SetKey(AsymmetricAlgorithm key) { if (key == null) throw new ArgumentNullException("key"); _rsaKey = (RSA) key; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BamlRecordWriter.cs
- ConfigurationSectionGroup.cs
- TableCell.cs
- Operator.cs
- NamespaceList.cs
- BitConverter.cs
- SchemaImporterExtensionElement.cs
- SafeTokenHandle.cs
- MemberRelationshipService.cs
- MultipleViewProviderWrapper.cs
- Part.cs
- AssociativeAggregationOperator.cs
- LocationSectionRecord.cs
- InputManager.cs
- _ListenerRequestStream.cs
- _AutoWebProxyScriptEngine.cs
- Geometry.cs
- LayoutTableCell.cs
- EventlogProvider.cs
- DefaultShape.cs
- WMIGenerator.cs
- ListChangedEventArgs.cs
- ACE.cs
- MdImport.cs
- MutexSecurity.cs
- MouseBinding.cs
- WebExceptionStatus.cs
- DragEventArgs.cs
- Expressions.cs
- ExceptionWrapper.cs
- LiteralSubsegment.cs
- EntityDataSourceView.cs
- ToolStripDropDown.cs
- StatusStrip.cs
- WindowsBrush.cs
- IPeerNeighbor.cs
- ModelPropertyCollectionImpl.cs
- HandlerBase.cs
- CodeGenHelper.cs
- SpeechRecognitionEngine.cs
- DriveNotFoundException.cs
- NameValuePermission.cs
- XmlSchemaSimpleContentRestriction.cs
- EventLog.cs
- ByteFacetDescriptionElement.cs
- RoutedPropertyChangedEventArgs.cs
- BlurBitmapEffect.cs
- Preprocessor.cs
- XmlChildNodes.cs
- ToolStripTextBox.cs
- IssuedTokenClientBehaviorsElement.cs
- SqlDuplicator.cs
- FillErrorEventArgs.cs
- ContextProperty.cs
- StringArrayConverter.cs
- HtmlUtf8RawTextWriter.cs
- NewArrayExpression.cs
- BrushValueSerializer.cs
- SqlResolver.cs
- CalendarTable.cs
- EventRecordWrittenEventArgs.cs
- XmlAutoDetectWriter.cs
- GeneralTransform.cs
- ConfigXmlCDataSection.cs
- PageHandlerFactory.cs
- GridViewPageEventArgs.cs
- ListViewPagedDataSource.cs
- Rotation3DAnimation.cs
- Command.cs
- ProjectionPlanCompiler.cs
- VoiceObjectToken.cs
- BuilderPropertyEntry.cs
- ItemCollection.cs
- HttpChannelBindingToken.cs
- DataGridAddNewRow.cs
- DelayDesigner.cs
- VarRemapper.cs
- SafeNativeMethods.cs
- TCEAdapterGenerator.cs
- _ContextAwareResult.cs
- GAC.cs
- Latin1Encoding.cs
- Rect3D.cs
- RSAOAEPKeyExchangeDeformatter.cs
- BaseResourcesBuildProvider.cs
- ResourcesBuildProvider.cs
- AlternateView.cs
- TextTreeRootNode.cs
- Exceptions.cs
- ButtonColumn.cs
- StreamMarshaler.cs
- WindowsNonControl.cs
- MultiPageTextView.cs
- DiagnosticTrace.cs
- IDispatchConstantAttribute.cs
- BoundColumn.cs
- mediaeventshelper.cs
- BufferManager.cs
- EDesignUtil.cs
- Pen.cs