Code:
/ FX-1434 / FX-1434 / 1.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
- FontNameConverter.cs
- WebPart.cs
- HwndSourceParameters.cs
- IgnoreFlushAndCloseStream.cs
- OptimalBreakSession.cs
- ScriptControlDescriptor.cs
- StringSorter.cs
- MatchingStyle.cs
- ContentPropertyAttribute.cs
- PrintEvent.cs
- ObjectSecurity.cs
- TitleStyle.cs
- ScrollViewer.cs
- EntityContainerEntitySetDefiningQuery.cs
- ResourceType.cs
- Int16AnimationBase.cs
- InternalControlCollection.cs
- GuidelineSet.cs
- GeneralTransform.cs
- ProfileGroupSettingsCollection.cs
- BufferedGraphics.cs
- FormatConvertedBitmap.cs
- invalidudtexception.cs
- RoleManagerModule.cs
- CollectionView.cs
- Timer.cs
- SqlCrossApplyToCrossJoin.cs
- COM2PropertyPageUITypeConverter.cs
- SqlTypesSchemaImporter.cs
- ImmutableCollection.cs
- EventlogProvider.cs
- Item.cs
- PropertySourceInfo.cs
- GatewayIPAddressInformationCollection.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- FamilyMap.cs
- sqlmetadatafactory.cs
- DataListCommandEventArgs.cs
- TableRow.cs
- InvalidProgramException.cs
- BatchWriter.cs
- ReferencedAssembly.cs
- ConfigurationSectionHelper.cs
- DomNameTable.cs
- VirtualPathUtility.cs
- TypeListConverter.cs
- XmlQualifiedName.cs
- OleDbConnectionInternal.cs
- SerializationAttributes.cs
- EntityConnectionStringBuilder.cs
- NetWebProxyFinder.cs
- ColorBlend.cs
- UInt16Storage.cs
- ClientSettingsProvider.cs
- BitmapDecoder.cs
- Grammar.cs
- TypedDatasetGenerator.cs
- BookmarkCallbackWrapper.cs
- DocComment.cs
- MessageHeaderException.cs
- XsdBuilder.cs
- ExportFileRequest.cs
- ErrorWebPart.cs
- UnsafeNetInfoNativeMethods.cs
- SplineKeyFrames.cs
- ResourceBinder.cs
- XmlCodeExporter.cs
- GPPOINT.cs
- CodeComment.cs
- wgx_render.cs
- SendingRequestEventArgs.cs
- InvalidDataException.cs
- OptimizedTemplateContentHelper.cs
- ScriptingJsonSerializationSection.cs
- GridViewAutomationPeer.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- TableColumn.cs
- EntityCommand.cs
- RangeValidator.cs
- AssemblySettingAttributes.cs
- SystemWebCachingSectionGroup.cs
- UserMapPath.cs
- NonBatchDirectoryCompiler.cs
- VirtualPathProvider.cs
- Style.cs
- Lasso.cs
- CommonXSendMessage.cs
- JavaScriptObjectDeserializer.cs
- XmlTextWriter.cs
- ConnectivityStatus.cs
- Soap.cs
- WebPartDisplayModeEventArgs.cs
- RuntimeConfigLKG.cs
- HtmlToClrEventProxy.cs
- Effect.cs
- Span.cs
- InheritanceAttribute.cs
- AssemblyResourceLoader.cs
- PropertyIDSet.cs
- SearchForVirtualItemEventArgs.cs