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
- CallbackValidator.cs
- KeyedCollection.cs
- propertyentry.cs
- Exception.cs
- StructuralComparisons.cs
- ModelService.cs
- RotateTransform3D.cs
- LoadedOrUnloadedOperation.cs
- Bitmap.cs
- SQLString.cs
- CounterSet.cs
- CreateRefExpr.cs
- LinqDataSourceUpdateEventArgs.cs
- EventMappingSettingsCollection.cs
- VersionedStreamOwner.cs
- DoWhile.cs
- URI.cs
- TextTreeObjectNode.cs
- ChtmlTextWriter.cs
- XmlSchemaSimpleContentRestriction.cs
- LineServices.cs
- CustomPopupPlacement.cs
- ScriptMethodAttribute.cs
- precedingquery.cs
- CursorConverter.cs
- RequestCache.cs
- WebPartConnectionsCloseVerb.cs
- UpdateCommandGenerator.cs
- EntityCollectionChangedParams.cs
- _TLSstream.cs
- FontWeights.cs
- FormsAuthenticationModule.cs
- Dynamic.cs
- SqlRemoveConstantOrderBy.cs
- NativeMethods.cs
- FacetEnabledSchemaElement.cs
- GeneratedView.cs
- ISessionStateStore.cs
- StateMachine.cs
- HttpModuleAction.cs
- XPathMultyIterator.cs
- EncodingTable.cs
- SuppressMergeCheckAttribute.cs
- SystemMulticastIPAddressInformation.cs
- autovalidator.cs
- CertificateElement.cs
- XmlSiteMapProvider.cs
- CookieHandler.cs
- ManagementEventWatcher.cs
- ConnectionStringSettingsCollection.cs
- VisemeEventArgs.cs
- SignatureToken.cs
- DbProviderFactoriesConfigurationHandler.cs
- TypeConverterHelper.cs
- MemberDescriptor.cs
- CutCopyPasteHelper.cs
- PhysicalAddress.cs
- AutomationPeer.cs
- ObjectStateFormatter.cs
- LinkLabel.cs
- Exceptions.cs
- CoreChannel.cs
- TextServicesProperty.cs
- TimelineGroup.cs
- MutexSecurity.cs
- HwndProxyElementProvider.cs
- ToggleButtonAutomationPeer.cs
- CommonDialog.cs
- SoapIncludeAttribute.cs
- SystemResources.cs
- MessagingDescriptionAttribute.cs
- DataGridViewLinkCell.cs
- SizeAnimationClockResource.cs
- InvokePattern.cs
- DataSetSchema.cs
- KeyToListMap.cs
- UserControl.cs
- ObjectKeyFrameCollection.cs
- SchemaTypeEmitter.cs
- TraceEventCache.cs
- HelpKeywordAttribute.cs
- AutoResizedEvent.cs
- ObjectContextServiceProvider.cs
- XPathMessageContext.cs
- ImmutableCollection.cs
- HttpCachePolicyElement.cs
- MasterPageParser.cs
- CheckableControlBaseAdapter.cs
- HybridDictionary.cs
- LayoutInformation.cs
- SoapCodeExporter.cs
- TableRow.cs
- MatrixAnimationUsingKeyFrames.cs
- TextRangeEdit.cs
- SiteOfOriginPart.cs
- FrameworkContentElement.cs
- NetTcpSection.cs
- XmlSchemaSet.cs
- XmlDocumentSurrogate.cs
- LostFocusEventManager.cs