Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / RandomNumberGenerator.cs / 1305376 / RandomNumberGenerator.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // RandomNumberGenerator.cs // namespace System.Security.Cryptography { #if !FEATURE_CORECLR && !SILVERLIGHT [System.Runtime.InteropServices.ComVisible(true)] #endif // !FEATURE_CORECLR && !SILVERLIGHT public abstract class RandomNumberGenerator // On Orcas RandomNumberGenerator is not disposable, so we cannot add the IDisposable implementation to the // CoreCLR mscorlib. However, this type does need to be disposable since subtypes can and do hold onto // native resources. Therefore, on desktop mscorlibs we add an IDisposable implementation. #if !FEATURE_CORECLR : IDisposable #endif // !FEATURE_CORECLR { protected RandomNumberGenerator() { } // // public methods // #if !FEATURE_CORECLR && !SILVERLIGHT && !CORIOLIS [System.Security.SecuritySafeCritical] // auto-generated static public RandomNumberGenerator Create() { return Create("System.Security.Cryptography.RandomNumberGenerator"); } [System.Security.SecuritySafeCritical] // auto-generated static public RandomNumberGenerator Create(String rngName) { return (RandomNumberGenerator) CryptoConfig.CreateFromName(rngName); } #endif // !FEATURE_CORECLR && !SILVERLIGHT && !CORIOLIS public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { return; } public abstract void GetBytes(byte[] data); #if !FEATURE_CORECLR && !SILVERLIGHT public abstract void GetNonZeroBytes(byte[] data); #endif // !FEATURE_CORECLR && !SILVERLIGHT } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // RandomNumberGenerator.cs // namespace System.Security.Cryptography { #if !FEATURE_CORECLR && !SILVERLIGHT [System.Runtime.InteropServices.ComVisible(true)] #endif // !FEATURE_CORECLR && !SILVERLIGHT public abstract class RandomNumberGenerator // On Orcas RandomNumberGenerator is not disposable, so we cannot add the IDisposable implementation to the // CoreCLR mscorlib. However, this type does need to be disposable since subtypes can and do hold onto // native resources. Therefore, on desktop mscorlibs we add an IDisposable implementation. #if !FEATURE_CORECLR : IDisposable #endif // !FEATURE_CORECLR { protected RandomNumberGenerator() { } // // public methods // #if !FEATURE_CORECLR && !SILVERLIGHT && !CORIOLIS [System.Security.SecuritySafeCritical] // auto-generated static public RandomNumberGenerator Create() { return Create("System.Security.Cryptography.RandomNumberGenerator"); } [System.Security.SecuritySafeCritical] // auto-generated static public RandomNumberGenerator Create(String rngName) { return (RandomNumberGenerator) CryptoConfig.CreateFromName(rngName); } #endif // !FEATURE_CORECLR && !SILVERLIGHT && !CORIOLIS public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { return; } public abstract void GetBytes(byte[] data); #if !FEATURE_CORECLR && !SILVERLIGHT public abstract void GetNonZeroBytes(byte[] data); #endif // !FEATURE_CORECLR && !SILVERLIGHT } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FilterElement.cs
- FullTextBreakpoint.cs
- DrawingGroupDrawingContext.cs
- WebPartVerb.cs
- HMACSHA1.cs
- ColumnMapTranslator.cs
- SqlBuffer.cs
- UnsafeCollabNativeMethods.cs
- TextElementCollectionHelper.cs
- LineGeometry.cs
- BehaviorService.cs
- SerializationException.cs
- TableLayoutCellPaintEventArgs.cs
- CodeExporter.cs
- CreateRefExpr.cs
- MailWebEventProvider.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- PartialCachingControl.cs
- PictureBoxDesigner.cs
- AttributeCollection.cs
- ComboBoxItem.cs
- EdgeProfileValidation.cs
- DataGridViewCellConverter.cs
- GridViewSelectEventArgs.cs
- Encoder.cs
- OutputCacheSettingsSection.cs
- CurrencyWrapper.cs
- StringUtil.cs
- VirtualPathUtility.cs
- EntityContainerEntitySetDefiningQuery.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- SettingsSection.cs
- RealizationContext.cs
- ExpressionBuilderContext.cs
- TransformDescriptor.cs
- RequestStatusBarUpdateEventArgs.cs
- JapaneseCalendar.cs
- SystemTcpConnection.cs
- SuppressMessageAttribute.cs
- LightweightEntityWrapper.cs
- FontInfo.cs
- RegionIterator.cs
- UserControl.cs
- TextServicesManager.cs
- SolidColorBrush.cs
- Lease.cs
- MimeMultiPart.cs
- CalendarDateRange.cs
- InArgument.cs
- XpsFilter.cs
- ResolveNameEventArgs.cs
- SectionRecord.cs
- wpf-etw.cs
- WindowsSecurityTokenAuthenticator.cs
- BuildProvider.cs
- AutomationPatternInfo.cs
- WindowsSecurityToken.cs
- Vector3DValueSerializer.cs
- KoreanCalendar.cs
- CustomErrorsSection.cs
- InstanceStoreQueryResult.cs
- BitmapSource.cs
- CacheModeConverter.cs
- ListCollectionView.cs
- FormsAuthenticationConfiguration.cs
- WebControlsSection.cs
- LinearGradientBrush.cs
- SQLCharsStorage.cs
- FontConverter.cs
- ToolStripContainerDesigner.cs
- TargetParameterCountException.cs
- _NTAuthentication.cs
- IsolatedStorageFilePermission.cs
- __TransparentProxy.cs
- MetadataItemSerializer.cs
- NamespaceEmitter.cs
- EventListener.cs
- SQLInt16Storage.cs
- ResourceBinder.cs
- SiteMapNodeItem.cs
- httpapplicationstate.cs
- XmlDataSourceNodeDescriptor.cs
- CodeGotoStatement.cs
- EmptyQuery.cs
- RoleGroup.cs
- LeftCellWrapper.cs
- HebrewNumber.cs
- followingquery.cs
- XPathDocument.cs
- CategoriesDocumentFormatter.cs
- MemberListBinding.cs
- ObjectQuery_EntitySqlExtensions.cs
- GlyphsSerializer.cs
- RenderingBiasValidation.cs
- Property.cs
- XmlSchemaComplexContentExtension.cs
- ModelTreeEnumerator.cs
- Buffer.cs
- LineBreakRecord.cs
- DataObjectEventArgs.cs