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
- UnsafePeerToPeerMethods.cs
- XmlSchemaProviderAttribute.cs
- DBSqlParser.cs
- XamlHostingConfiguration.cs
- ImageCodecInfo.cs
- Timer.cs
- ProcessThread.cs
- WsdlBuildProvider.cs
- RuntimeCompatibilityAttribute.cs
- ReadOnlyHierarchicalDataSource.cs
- AddInStore.cs
- XmlSchemaFacet.cs
- Vector3DIndependentAnimationStorage.cs
- ButtonColumn.cs
- PaperSource.cs
- StructuredTypeEmitter.cs
- GorillaCodec.cs
- XmlUrlEditor.cs
- JapaneseCalendar.cs
- PersistChildrenAttribute.cs
- RSAOAEPKeyExchangeFormatter.cs
- SmiRecordBuffer.cs
- Int32AnimationUsingKeyFrames.cs
- MonthChangedEventArgs.cs
- BamlLocalizableResourceKey.cs
- DataSourceCacheDurationConverter.cs
- QueryComponents.cs
- _DisconnectOverlappedAsyncResult.cs
- DataReaderContainer.cs
- _WinHttpWebProxyDataBuilder.cs
- RegexParser.cs
- RuleSettings.cs
- SqlReorderer.cs
- ManagementPath.cs
- configsystem.cs
- SecurityException.cs
- SelectionProcessor.cs
- FileAccessException.cs
- CodeDomDecompiler.cs
- FrameworkElementFactory.cs
- RegistrySecurity.cs
- StringCollection.cs
- DataPagerFieldCollection.cs
- CounterSet.cs
- FacetValues.cs
- DocumentGridContextMenu.cs
- GeometryConverter.cs
- CSharpCodeProvider.cs
- BindingEntityInfo.cs
- Number.cs
- AssemblyResourceLoader.cs
- TextBoxView.cs
- ObjectContextServiceProvider.cs
- WSSecurityPolicy11.cs
- DataContractSerializerFaultFormatter.cs
- ThicknessKeyFrameCollection.cs
- HttpStaticObjectsCollectionWrapper.cs
- XmlSchemaSimpleType.cs
- Parsers.cs
- SafeFileMappingHandle.cs
- Logging.cs
- EntityDataReader.cs
- ImageListUtils.cs
- CatalogPartCollection.cs
- BamlLocalizableResourceKey.cs
- MethodAccessException.cs
- KnownIds.cs
- ProcessHostConfigUtils.cs
- TraceData.cs
- ToolBarPanel.cs
- WindowsTooltip.cs
- AvTraceDetails.cs
- PasswordTextContainer.cs
- AnnotationHelper.cs
- DateTimeSerializationSection.cs
- GCHandleCookieTable.cs
- DocumentReference.cs
- GeneralTransform2DTo3D.cs
- CompositeDataBoundControl.cs
- BamlLocalizableResource.cs
- ValidationSummary.cs
- ShapingWorkspace.cs
- NamespaceEmitter.cs
- MsmqIntegrationElement.cs
- backend.cs
- dsa.cs
- ToolStripContentPanelRenderEventArgs.cs
- ConfigurationSectionGroupCollection.cs
- AppliedDeviceFiltersEditor.cs
- ColorConverter.cs
- CodeStatementCollection.cs
- FillErrorEventArgs.cs
- MouseActionValueSerializer.cs
- ContentDisposition.cs
- InstallerTypeAttribute.cs
- DefaultValidator.cs
- IPEndPoint.cs
- TypeInfo.cs
- Timer.cs
- HashMembershipCondition.cs