Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Int64.cs
- DeviceFiltersSection.cs
- QueryServiceConfigHandle.cs
- PointLightBase.cs
- TypeGeneratedEventArgs.cs
- DynamicArgumentDesigner.xaml.cs
- SelectedCellsCollection.cs
- ExpressionBinding.cs
- Hyperlink.cs
- listviewsubitemcollectioneditor.cs
- XmlSchemaRedefine.cs
- TypeContext.cs
- Button.cs
- List.cs
- BasicCellRelation.cs
- DistributedTransactionPermission.cs
- Color.cs
- SystemWebCachingSectionGroup.cs
- RectAnimation.cs
- TagMapInfo.cs
- CharStorage.cs
- BinHexDecoder.cs
- Encoder.cs
- NumberFormatter.cs
- UIElement.cs
- EntityDataSourceConfigureObjectContext.cs
- HtmlControlDesigner.cs
- XmlAnyAttributeAttribute.cs
- OpacityConverter.cs
- externdll.cs
- Socket.cs
- InArgument.cs
- BitmapEffectGroup.cs
- WindowShowOrOpenTracker.cs
- EdmProperty.cs
- DataSourceSelectArguments.cs
- TextEffect.cs
- XmlReaderSettings.cs
- DataContext.cs
- WorkflowService.cs
- PointLightBase.cs
- CodeNamespaceCollection.cs
- WebScriptEnablingBehavior.cs
- InkCanvasFeedbackAdorner.cs
- SizeIndependentAnimationStorage.cs
- CustomWebEventKey.cs
- ArrayList.cs
- FileChangesMonitor.cs
- SEHException.cs
- Context.cs
- HtmlGenericControl.cs
- EditorPart.cs
- AuthenticationManager.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- XsltQilFactory.cs
- GifBitmapDecoder.cs
- CollectionChangeEventArgs.cs
- connectionpool.cs
- BindingParameterCollection.cs
- WebPartDisplayMode.cs
- ListControlConvertEventArgs.cs
- PersonalizationEntry.cs
- BamlLocalizabilityResolver.cs
- CollectionType.cs
- WebPartDescription.cs
- Rect.cs
- OleDbConnection.cs
- XmlComment.cs
- QuotedPairReader.cs
- UpdatePanel.cs
- WindowsStatic.cs
- MembershipSection.cs
- EventHandlerList.cs
- Set.cs
- RegexTree.cs
- TextElementCollection.cs
- AutoResetEvent.cs
- GroupItem.cs
- DataColumnSelectionConverter.cs
- MDIWindowDialog.cs
- XmlAttribute.cs
- GridItemCollection.cs
- MessageBox.cs
- ObjRef.cs
- Rfc2898DeriveBytes.cs
- PerformanceCounterPermissionEntryCollection.cs
- ScalarOps.cs
- HttpProcessUtility.cs
- DLinqAssociationProvider.cs
- WindowsMenu.cs
- WpfGeneratedKnownProperties.cs
- PaperSource.cs
- _LazyAsyncResult.cs
- UnsafeNativeMethods.cs
- XmlDataImplementation.cs
- FacetChecker.cs
- HistoryEventArgs.cs
- DataGridColumnHeaderAutomationPeer.cs
- NetMsmqSecurity.cs
- WeakReferenceList.cs