Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / Aes.cs / 1305376 / Aes.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== using System; using System.Runtime.CompilerServices; namespace System.Security.Cryptography { ////// Abstract base class for implementations of the AES algorithm /// #if !FEATURE_CORECLR [TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=b77a5c561934e089")] #else // FEATURE_CORECLR [TypeForwardedFrom("System.Core, Version=2.0.5.0, Culture=Neutral, PublicKeyToken=7cec85d7bea7798e")] #endif // !FEATURE_CORECLR public abstract class Aes : SymmetricAlgorithm { private static KeySizes[] s_legalBlockSizes = { new KeySizes(128, 128, 0) }; private static KeySizes[] s_legalKeySizes = { new KeySizes(128, 256, 64) }; ////// Setup the default values for AES encryption /// protected Aes() { LegalBlockSizesValue = s_legalBlockSizes; LegalKeySizesValue = s_legalKeySizes; BlockSizeValue = 128; FeedbackSizeValue = 8; KeySizeValue = 256; ModeValue = CipherMode.CBC; } public static new Aes Create() { return Create("AES"); } public static new Aes Create(string algorithmName) { if (algorithmName == null) { throw new ArgumentNullException("algorithmName"); } return CryptoConfig.CreateFromName(algorithmName) as Aes; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== using System; using System.Runtime.CompilerServices; namespace System.Security.Cryptography { ////// Abstract base class for implementations of the AES algorithm /// #if !FEATURE_CORECLR [TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=b77a5c561934e089")] #else // FEATURE_CORECLR [TypeForwardedFrom("System.Core, Version=2.0.5.0, Culture=Neutral, PublicKeyToken=7cec85d7bea7798e")] #endif // !FEATURE_CORECLR public abstract class Aes : SymmetricAlgorithm { private static KeySizes[] s_legalBlockSizes = { new KeySizes(128, 128, 0) }; private static KeySizes[] s_legalKeySizes = { new KeySizes(128, 256, 64) }; ////// Setup the default values for AES encryption /// protected Aes() { LegalBlockSizesValue = s_legalBlockSizes; LegalKeySizesValue = s_legalKeySizes; BlockSizeValue = 128; FeedbackSizeValue = 8; KeySizeValue = 256; ModeValue = CipherMode.CBC; } public static new Aes Create() { return Create("AES"); } public static new Aes Create(string algorithmName) { if (algorithmName == null) { throw new ArgumentNullException("algorithmName"); } return CryptoConfig.CreateFromName(algorithmName) as Aes; } } } // 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
- HelpEvent.cs
- Slider.cs
- PowerModeChangedEventArgs.cs
- SystemNetworkInterface.cs
- ComponentEditorForm.cs
- ObjectTypeMapping.cs
- XD.cs
- AmbientLight.cs
- DesignTimeTemplateParser.cs
- CmsInterop.cs
- DataServiceRequestException.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- RuntimeConfigurationRecord.cs
- BitmapData.cs
- WebAdminConfigurationHelper.cs
- IIS7WorkerRequest.cs
- RoleManagerModule.cs
- SourceFilter.cs
- TextDpi.cs
- EndOfStreamException.cs
- PropertyChangedEventManager.cs
- HttpListenerPrefixCollection.cs
- BoundsDrawingContextWalker.cs
- Stopwatch.cs
- UrlAuthFailureHandler.cs
- DiscoveryMessageSequence11.cs
- SoapAttributeOverrides.cs
- CacheDependency.cs
- AccessDataSource.cs
- RelationalExpressions.cs
- XPathAncestorIterator.cs
- EntityDataSourceValidationException.cs
- TextEditorTyping.cs
- CodeGotoStatement.cs
- Pair.cs
- BuildTopDownAttribute.cs
- SafeArrayTypeMismatchException.cs
- FileStream.cs
- Win32Native.cs
- WebBaseEventKeyComparer.cs
- CodeGotoStatement.cs
- XmlLanguage.cs
- DesignerInterfaces.cs
- SqlMetaData.cs
- MatrixAnimationUsingKeyFrames.cs
- KeyTimeConverter.cs
- ToolStripOverflow.cs
- EventLogPropertySelector.cs
- InternalSafeNativeMethods.cs
- DiscoveryClientDocuments.cs
- Rijndael.cs
- HostingPreferredMapPath.cs
- AngleUtil.cs
- Constraint.cs
- DiscoveryDocument.cs
- SendParametersContent.cs
- Run.cs
- MdiWindowListStrip.cs
- CellTreeNode.cs
- EntityCollection.cs
- OracleRowUpdatedEventArgs.cs
- RoutingEndpointTrait.cs
- WindowsListViewGroupHelper.cs
- MonitoringDescriptionAttribute.cs
- Matrix3DConverter.cs
- FindCriteria11.cs
- EncoderFallback.cs
- AddingNewEventArgs.cs
- SingleObjectCollection.cs
- PathSegmentCollection.cs
- SingleTagSectionHandler.cs
- BaseConfigurationRecord.cs
- QilDataSource.cs
- TextEffect.cs
- ConnectionStringsSection.cs
- _RegBlobWebProxyDataBuilder.cs
- Quaternion.cs
- OleDbStruct.cs
- ToolStripDropDownClosedEventArgs.cs
- SoundPlayerAction.cs
- ProfileGroupSettings.cs
- Dictionary.cs
- DataGridViewComboBoxEditingControl.cs
- HtmlTableRow.cs
- CompareInfo.cs
- SerializationObjectManager.cs
- SafeNativeMethodsMilCoreApi.cs
- SecUtil.cs
- PropertyInformation.cs
- SystemColors.cs
- BoolExpressionVisitors.cs
- DesignerRegionCollection.cs
- MasterPageBuildProvider.cs
- ExtractorMetadata.cs
- GridViewRow.cs
- PropertyPathConverter.cs
- PropertyChangeTracker.cs
- Comparer.cs
- SplitterEvent.cs
- GenerateHelper.cs