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
- XmlWhitespace.cs
- WizardStepBase.cs
- CompModSwitches.cs
- sqlinternaltransaction.cs
- ValuePatternIdentifiers.cs
- DPCustomTypeDescriptor.cs
- DiscardableAttribute.cs
- NullableFloatMinMaxAggregationOperator.cs
- DetailsViewUpdateEventArgs.cs
- SerializableTypeCodeDomSerializer.cs
- GeneratedContractType.cs
- PolicyLevel.cs
- ZipIOCentralDirectoryBlock.cs
- DrawListViewItemEventArgs.cs
- TemplateControlParser.cs
- ResourceDescriptionAttribute.cs
- DESCryptoServiceProvider.cs
- SourceFileBuildProvider.cs
- SchemaElement.cs
- ByteStreamGeometryContext.cs
- ListViewGroupConverter.cs
- Pointer.cs
- PrinterResolution.cs
- TypefaceMap.cs
- WmfPlaceableFileHeader.cs
- ServiceReference.cs
- TextProperties.cs
- ParagraphResult.cs
- wmiprovider.cs
- TimersDescriptionAttribute.cs
- SvcMapFileSerializer.cs
- UnSafeCharBuffer.cs
- TreeNodeSelectionProcessor.cs
- HtmlTable.cs
- ApplicationId.cs
- QilXmlReader.cs
- Translator.cs
- XsdDateTime.cs
- XmlQueryContext.cs
- FixedSchema.cs
- ElementProxy.cs
- XmlJsonReader.cs
- ContentFileHelper.cs
- Metafile.cs
- sortedlist.cs
- Parser.cs
- HitTestWithGeometryDrawingContextWalker.cs
- CallInfo.cs
- EventBookmark.cs
- GCHandleCookieTable.cs
- CurrencyWrapper.cs
- ClientConfigurationHost.cs
- FormViewCommandEventArgs.cs
- __ComObject.cs
- URLIdentityPermission.cs
- InitializationEventAttribute.cs
- CodeDomConfigurationHandler.cs
- EventDescriptor.cs
- XmlNotation.cs
- ToggleProviderWrapper.cs
- Debugger.cs
- DSACryptoServiceProvider.cs
- IdleTimeoutMonitor.cs
- Model3D.cs
- SchemaLookupTable.cs
- EditCommandColumn.cs
- StateManager.cs
- ConnectionsZoneDesigner.cs
- SemanticBasicElement.cs
- TypeConverterHelper.cs
- Boolean.cs
- EventLogQuery.cs
- DriveNotFoundException.cs
- SecurityHeaderLayout.cs
- AppendHelper.cs
- DockAndAnchorLayout.cs
- DbConnectionInternal.cs
- ReachDocumentPageSerializer.cs
- FolderBrowserDialog.cs
- BulletDecorator.cs
- PageThemeCodeDomTreeGenerator.cs
- HtmlInputHidden.cs
- PackagePart.cs
- Stacktrace.cs
- ImplicitInputBrush.cs
- GroupStyle.cs
- BuildProviderCollection.cs
- Message.cs
- TypeConverterValueSerializer.cs
- CompilationLock.cs
- AnnotationService.cs
- NativeMethods.cs
- DataKeyCollection.cs
- ExpressionBindingCollection.cs
- unsafenativemethodstextservices.cs
- Bold.cs
- TableParagraph.cs
- CompiledXpathExpr.cs
- Rect3D.cs
- SqlTriggerContext.cs