Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / RSAOAEPKeyExchangeDeformatter.cs / 1305376 / RSAOAEPKeyExchangeDeformatter.cs
using System.Diagnostics.Contracts; // ==++== // // 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"); Contract.EndContractBlock(); _rsaKey = (RSA) key; } // // public properties // public override String Parameters { get { return null; } set { ; } } // // public methods // [System.Security.SecuritySafeCritical] // auto-generated 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"); Contract.EndContractBlock(); _rsaKey = (RSA) key; } } } // 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
- Form.cs
- BindingMAnagerBase.cs
- ListControl.cs
- DataGridViewRowPostPaintEventArgs.cs
- TaskFileService.cs
- Function.cs
- HashAlgorithm.cs
- XpsStructure.cs
- BookmarkScopeInfo.cs
- WindowsListViewItem.cs
- DrawingImage.cs
- XmlIncludeAttribute.cs
- DependencyObjectType.cs
- TabRenderer.cs
- TemplateControl.cs
- Gdiplus.cs
- TabletCollection.cs
- ZipFileInfoCollection.cs
- ElementNotAvailableException.cs
- DataServices.cs
- GPRECTF.cs
- ChtmlTextWriter.cs
- PropertyDescriptorGridEntry.cs
- WrappedIUnknown.cs
- Ref.cs
- StringValueSerializer.cs
- GridSplitter.cs
- ApplicationGesture.cs
- QueryParameter.cs
- SimpleBitVector32.cs
- EntitySqlQueryBuilder.cs
- ReservationCollection.cs
- ReflectEventDescriptor.cs
- TrackPoint.cs
- Byte.cs
- CompositeFontParser.cs
- HttpTransportBindingElement.cs
- HttpContext.cs
- pingexception.cs
- ColorContext.cs
- TrackingStringDictionary.cs
- FixedDocument.cs
- ScaleTransform.cs
- ImageButton.cs
- TempFiles.cs
- XmlBinaryWriter.cs
- PackagePartCollection.cs
- Converter.cs
- TraceHandler.cs
- ConnectionInterfaceCollection.cs
- HtmlButton.cs
- PasswordRecovery.cs
- TouchesOverProperty.cs
- AnnotationStore.cs
- IndexedEnumerable.cs
- XmlSerializerNamespaces.cs
- HostingEnvironment.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ZipFileInfo.cs
- Variant.cs
- MemberHolder.cs
- DesignerTransactionCloseEvent.cs
- XmlSigningNodeWriter.cs
- ColumnPropertiesGroup.cs
- SqlConnectionManager.cs
- XmlPreloadedResolver.cs
- DataRowCollection.cs
- RuleAction.cs
- RIPEMD160Managed.cs
- ImageField.cs
- EastAsianLunisolarCalendar.cs
- D3DImage.cs
- AlignmentYValidation.cs
- DataObjectAttribute.cs
- BinaryMethodMessage.cs
- QueryContext.cs
- EdmProperty.cs
- ContainerUtilities.cs
- TypeUtils.cs
- SeekStoryboard.cs
- PngBitmapDecoder.cs
- Deflater.cs
- OleDbCommand.cs
- Exceptions.cs
- CTreeGenerator.cs
- Geometry.cs
- CompilerGeneratedAttribute.cs
- SafeNativeMethods.cs
- EmptyCollection.cs
- Hash.cs
- DayRenderEvent.cs
- mactripleDES.cs
- SocketException.cs
- ServiceDebugElement.cs
- MulticastOption.cs
- KeyValuePairs.cs
- VersionValidator.cs
- HtmlControlPersistable.cs
- Substitution.cs
- BindingContext.cs