Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / infocard / common / managed / InfoCardCryptoHelper.cs / 1305376 / InfoCardCryptoHelper.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace Microsoft.InfoCards { using System.IdentityModel.Tokens; using System.Security.Cryptography; using System.Security.Cryptography.Xml; // copied from IdentityModel\CryptoHelper.cs and they need to be kept in [....]. After V1, we need to rethink how we can have // a single place to ask this question. Perhaps even add it as an extensibility internal static class InfoCardCryptoHelper { internal static bool IsAsymmetricAlgorithm(string algorithm) { switch (algorithm) { case SecurityAlgorithms.DsaSha1Signature: case SecurityAlgorithms.RsaSha1Signature: case SecurityAlgorithms.RsaSha256Signature: case SecurityAlgorithms.RsaOaepKeyWrap: case SecurityAlgorithms.RsaV15KeyWrap: return true; default: return false; } } internal static bool IsSymmetricAlgorithm(string algorithm) { switch (algorithm) { case SecurityAlgorithms.HmacSha1Signature: case SecurityAlgorithms.HmacSha256Signature: case SecurityAlgorithms.Aes128Encryption: case SecurityAlgorithms.Aes192Encryption: case SecurityAlgorithms.Aes256Encryption: case SecurityAlgorithms.TripleDesEncryption: case SecurityAlgorithms.Aes128KeyWrap: case SecurityAlgorithms.Aes192KeyWrap: case SecurityAlgorithms.Aes256KeyWrap: case SecurityAlgorithms.TripleDesKeyWrap: case SecurityAlgorithms.Psha1KeyDerivation: case SecurityAlgorithms.Psha1KeyDerivationDec2005: return true; default: return false; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace Microsoft.InfoCards { using System.IdentityModel.Tokens; using System.Security.Cryptography; using System.Security.Cryptography.Xml; // copied from IdentityModel\CryptoHelper.cs and they need to be kept in [....]. After V1, we need to rethink how we can have // a single place to ask this question. Perhaps even add it as an extensibility internal static class InfoCardCryptoHelper { internal static bool IsAsymmetricAlgorithm(string algorithm) { switch (algorithm) { case SecurityAlgorithms.DsaSha1Signature: case SecurityAlgorithms.RsaSha1Signature: case SecurityAlgorithms.RsaSha256Signature: case SecurityAlgorithms.RsaOaepKeyWrap: case SecurityAlgorithms.RsaV15KeyWrap: return true; default: return false; } } internal static bool IsSymmetricAlgorithm(string algorithm) { switch (algorithm) { case SecurityAlgorithms.HmacSha1Signature: case SecurityAlgorithms.HmacSha256Signature: case SecurityAlgorithms.Aes128Encryption: case SecurityAlgorithms.Aes192Encryption: case SecurityAlgorithms.Aes256Encryption: case SecurityAlgorithms.TripleDesEncryption: case SecurityAlgorithms.Aes128KeyWrap: case SecurityAlgorithms.Aes192KeyWrap: case SecurityAlgorithms.Aes256KeyWrap: case SecurityAlgorithms.TripleDesKeyWrap: case SecurityAlgorithms.Psha1KeyDerivation: case SecurityAlgorithms.Psha1KeyDerivationDec2005: return true; default: return false; } } } } // 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
- HttpConfigurationSystem.cs
- DbProviderServices.cs
- HighContrastHelper.cs
- FormsAuthenticationModule.cs
- MeasureData.cs
- TextEditorParagraphs.cs
- ExceptionTranslationTable.cs
- TextRangeEdit.cs
- COM2PropertyPageUITypeConverter.cs
- EntitySqlException.cs
- HttpCookieCollection.cs
- ConsumerConnectionPointCollection.cs
- SwitchAttribute.cs
- ValidatorUtils.cs
- Asn1IntegerConverter.cs
- MatrixStack.cs
- ProgressChangedEventArgs.cs
- RegularExpressionValidator.cs
- XmlIgnoreAttribute.cs
- HandlerElementCollection.cs
- DataGridRowAutomationPeer.cs
- SafeRightsManagementQueryHandle.cs
- _DigestClient.cs
- SystemSounds.cs
- GridViewActionList.cs
- ICspAsymmetricAlgorithm.cs
- DesignerCatalogPartChrome.cs
- XmlSchemaImporter.cs
- FlowNode.cs
- ColorConvertedBitmapExtension.cs
- ServerIdentity.cs
- CultureSpecificStringDictionary.cs
- Selector.cs
- CustomError.cs
- CustomPopupPlacement.cs
- TrustManagerPromptUI.cs
- TrackingServices.cs
- shaperfactoryquerycacheentry.cs
- RTTrackingProfile.cs
- DecoderNLS.cs
- Latin1Encoding.cs
- TextBreakpoint.cs
- PropertyToken.cs
- Positioning.cs
- ObjectQueryExecutionPlan.cs
- XmlSerializerAssemblyAttribute.cs
- ExceptionValidationRule.cs
- TextEffect.cs
- validation.cs
- DbConnectionPoolGroupProviderInfo.cs
- StrokeCollection2.cs
- DependencyObjectType.cs
- PerformanceCounterCategory.cs
- Clock.cs
- AttributedMetaModel.cs
- ProbeDuplex11AsyncResult.cs
- SpotLight.cs
- ArrayConverter.cs
- WsdlBuildProvider.cs
- DesignColumn.cs
- OleDbRowUpdatedEvent.cs
- TableStyle.cs
- ResourceManagerWrapper.cs
- DesignerCategoryAttribute.cs
- SqlCacheDependencyDatabaseCollection.cs
- StreamGeometry.cs
- DPAPIProtectedConfigurationProvider.cs
- AnnotationAdorner.cs
- SqlParameter.cs
- Win32Native.cs
- webproxy.cs
- MergeLocalizationDirectives.cs
- Random.cs
- DesignSurfaceServiceContainer.cs
- HtmlTableRow.cs
- RelationshipSet.cs
- OdbcTransaction.cs
- StaticFileHandler.cs
- MetroSerializationManager.cs
- TreeNodeClickEventArgs.cs
- ReadOnlyCollectionBase.cs
- BinaryCommonClasses.cs
- TypedReference.cs
- RectangleConverter.cs
- ConnectionOrientedTransportElement.cs
- FocusChangedEventArgs.cs
- wgx_render.cs
- configsystem.cs
- ImageField.cs
- HtmlInputRadioButton.cs
- ValidatingPropertiesEventArgs.cs
- SmtpReplyReaderFactory.cs
- FixedSOMContainer.cs
- ObjectContextServiceProvider.cs
- XmlSchemaSimpleType.cs
- PreloadedPackages.cs
- DataBindingCollection.cs
- RenderContext.cs
- LineSegment.cs
- ListItemCollection.cs