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
- PageCodeDomTreeGenerator.cs
- GridViewCellAutomationPeer.cs
- Triplet.cs
- DefaultTextStore.cs
- OracleParameterBinding.cs
- IISMapPath.cs
- OutArgument.cs
- ComponentResourceManager.cs
- MatrixTransform3D.cs
- IndependentAnimationStorage.cs
- MonthCalendar.cs
- XsltFunctions.cs
- AsyncCodeActivityContext.cs
- Vector3DCollectionValueSerializer.cs
- Util.cs
- Serializer.cs
- TreeSet.cs
- DataColumn.cs
- GeometryConverter.cs
- DesignTable.cs
- TreeWalker.cs
- CodeDomDecompiler.cs
- IIS7UserPrincipal.cs
- HScrollProperties.cs
- StringFunctions.cs
- DataBindEngine.cs
- HiddenField.cs
- TextStore.cs
- InfoCardMetadataExchangeClient.cs
- TextCollapsingProperties.cs
- TreeNodeStyle.cs
- HitTestWithPointDrawingContextWalker.cs
- StorageInfo.cs
- CodePageEncoding.cs
- Identity.cs
- TransportSecurityProtocol.cs
- X509RecipientCertificateServiceElement.cs
- PriorityItem.cs
- SyntaxCheck.cs
- CompiledAction.cs
- DiscoveryClient.cs
- PageThemeCodeDomTreeGenerator.cs
- RegexStringValidatorAttribute.cs
- DynamicArgumentDesigner.xaml.cs
- TextEditorSelection.cs
- ToolStripRenderer.cs
- SystemIcmpV6Statistics.cs
- WorkflowQueueInfo.cs
- DataGridViewToolTip.cs
- Bits.cs
- WebPartActionVerb.cs
- StatusBarPanel.cs
- CompensatableTransactionScopeActivityDesigner.cs
- RuntimeWrappedException.cs
- EncryptedReference.cs
- ConfigsHelper.cs
- EntityDataSourceViewSchema.cs
- SecurityVerifiedMessage.cs
- TargetControlTypeAttribute.cs
- CharKeyFrameCollection.cs
- ToolStripButton.cs
- CompilationUtil.cs
- EncoderReplacementFallback.cs
- VideoDrawing.cs
- ParseElementCollection.cs
- ConfigXmlText.cs
- DiscoveryVersion.cs
- DeploymentSectionCache.cs
- IsolatedStoragePermission.cs
- XmlSchemaSimpleContentExtension.cs
- CngKey.cs
- EntityDataReader.cs
- FileInfo.cs
- StaticTextPointer.cs
- StrongNameIdentityPermission.cs
- PersonalizationEntry.cs
- DataGridViewTextBoxColumn.cs
- NativeWindow.cs
- SharedPersonalizationStateInfo.cs
- OleDbCommandBuilder.cs
- Assembly.cs
- XsdValidatingReader.cs
- DescendentsWalkerBase.cs
- TreeWalker.cs
- Substitution.cs
- X509PeerCertificateAuthentication.cs
- SplitterPanel.cs
- ManagementOptions.cs
- SoundPlayer.cs
- ModelUtilities.cs
- StaticExtensionConverter.cs
- TemplateInstanceAttribute.cs
- TableRowCollection.cs
- PowerEase.cs
- UIElementCollection.cs
- SingleAnimationBase.cs
- DataListCommandEventArgs.cs
- webproxy.cs
- QuotedPrintableStream.cs
- DiscoveryReferences.cs