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
- ZipIOExtraFieldPaddingElement.cs
- CodeDomDesignerLoader.cs
- DoubleAnimationUsingPath.cs
- UpDownEvent.cs
- ExtentKey.cs
- AnimationLayer.cs
- SignedXml.cs
- RoleManagerSection.cs
- FlowDocumentView.cs
- WebScriptMetadataFormatter.cs
- IRCollection.cs
- Vector3D.cs
- XmlException.cs
- VirtualPath.cs
- FormatterServices.cs
- EntityConnectionStringBuilder.cs
- EntityDataSourceMemberPath.cs
- ClientScriptManager.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- PrintController.cs
- TextServicesCompartmentContext.cs
- Context.cs
- Color.cs
- ExpressionStringBuilder.cs
- MessageDecoder.cs
- UserControl.cs
- OleAutBinder.cs
- OptimalBreakSession.cs
- XamlToRtfParser.cs
- HybridDictionary.cs
- DetailsView.cs
- Method.cs
- ProxyWebPartConnectionCollection.cs
- Stacktrace.cs
- UserControlDocumentDesigner.cs
- PhysicalAddress.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- TextModifier.cs
- SafeNativeMethodsOther.cs
- PasswordRecovery.cs
- MemoryRecordBuffer.cs
- MetadataPropertyAttribute.cs
- SystemSounds.cs
- _TimerThread.cs
- HiddenField.cs
- CaseInsensitiveHashCodeProvider.cs
- EntityDataSourceColumn.cs
- VerificationException.cs
- HMAC.cs
- WorkflowInstance.cs
- NonSerializedAttribute.cs
- XmlDomTextWriter.cs
- SimpleType.cs
- Light.cs
- PtsHost.cs
- ReliabilityContractAttribute.cs
- Mapping.cs
- BinaryFormatterWriter.cs
- XamlTreeBuilderBamlRecordWriter.cs
- FileInfo.cs
- _ProxyChain.cs
- DataSourceGeneratorException.cs
- ToolStripPanel.cs
- PersonalizablePropertyEntry.cs
- HideDisabledControlAdapter.cs
- BrowserTree.cs
- ToolStripAdornerWindowService.cs
- EventLogLink.cs
- ContextTokenTypeConverter.cs
- SimpleHandlerBuildProvider.cs
- figurelengthconverter.cs
- FormViewPageEventArgs.cs
- ContainerParaClient.cs
- DeploymentSectionCache.cs
- BindUriHelper.cs
- ServiceDebugBehavior.cs
- Vector3DAnimation.cs
- dsa.cs
- UrlMappingsModule.cs
- DataListCommandEventArgs.cs
- GeneralTransform.cs
- MediaElement.cs
- SecureEnvironment.cs
- SizeValueSerializer.cs
- HtmlFormWrapper.cs
- CompilationLock.cs
- ImageAttributes.cs
- UnmanagedMemoryStreamWrapper.cs
- ThreadStartException.cs
- SchemaDeclBase.cs
- XmlSerializerSection.cs
- TextDpi.cs
- PreservationFileWriter.cs
- ExpressionPrefixAttribute.cs
- WebPartCancelEventArgs.cs
- EventsTab.cs
- LinqDataSourceContextEventArgs.cs
- MessageDesigner.cs
- EntityParameterCollection.cs
- SqlAggregateChecker.cs