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
- ParameterModifier.cs
- ValueProviderWrapper.cs
- Graph.cs
- QualifiedCellIdBoolean.cs
- COAUTHINFO.cs
- AdornerPresentationContext.cs
- DeviceContexts.cs
- Attribute.cs
- NativeMethodsOther.cs
- DesignObjectWrapper.cs
- XPathEmptyIterator.cs
- ProjectionPlanCompiler.cs
- PublishLicense.cs
- ImageAutomationPeer.cs
- EmptyStringExpandableObjectConverter.cs
- WebException.cs
- SetIndexBinder.cs
- WebResponse.cs
- SafeRightsManagementEnvironmentHandle.cs
- WebPartsPersonalizationAuthorization.cs
- CompilerErrorCollection.cs
- StrokeCollectionConverter.cs
- PositiveTimeSpanValidatorAttribute.cs
- TemplateControlParser.cs
- InplaceBitmapMetadataWriter.cs
- RootContext.cs
- UnicodeEncoding.cs
- EntityTransaction.cs
- UserUseLicenseDictionaryLoader.cs
- InvalidOperationException.cs
- SqlConnectionManager.cs
- OleDbErrorCollection.cs
- RealProxy.cs
- InputLangChangeEvent.cs
- ListControlStringCollectionEditor.cs
- HttpSocketManager.cs
- ObjectDataSourceSelectingEventArgs.cs
- RewritingValidator.cs
- DateTimeFormat.cs
- COAUTHINFO.cs
- BrowserCapabilitiesCodeGenerator.cs
- ErrorReporting.cs
- DataGridViewButtonColumn.cs
- XPathNodeHelper.cs
- UniqueIdentifierService.cs
- HttpCapabilitiesBase.cs
- MarkupCompilePass2.cs
- HtmlTableCellCollection.cs
- Thread.cs
- ParserHooks.cs
- FontWeightConverter.cs
- WmpBitmapDecoder.cs
- ClientUrlResolverWrapper.cs
- AssemblySettingAttributes.cs
- WebPartEditorCancelVerb.cs
- MimeMultiPart.cs
- EncoderParameter.cs
- CursorConverter.cs
- ControlPaint.cs
- OrderedHashRepartitionEnumerator.cs
- HttpGetProtocolReflector.cs
- PeerInputChannelListener.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- CustomGrammar.cs
- ProcessHostConfigUtils.cs
- LeftCellWrapper.cs
- ProtocolViolationException.cs
- TextCompositionEventArgs.cs
- ImageFormat.cs
- MailDefinition.cs
- TableColumn.cs
- PcmConverter.cs
- NodeFunctions.cs
- ObjectConverter.cs
- ControlDesigner.cs
- ListMarkerSourceInfo.cs
- AudioFormatConverter.cs
- SchemaNames.cs
- WriteTimeStream.cs
- FormsAuthenticationModule.cs
- ProfileManager.cs
- ExpressionVisitor.cs
- ComponentEvent.cs
- PageAsyncTaskManager.cs
- ObjectDataSourceEventArgs.cs
- ComAdminWrapper.cs
- ReaderWriterLockWrapper.cs
- coordinator.cs
- MetadataItemEmitter.cs
- MatrixUtil.cs
- BindingMemberInfo.cs
- LeafCellTreeNode.cs
- ObjectTag.cs
- TreeNodeSelectionProcessor.cs
- CompilationSection.cs
- ColumnReorderedEventArgs.cs
- LoginCancelEventArgs.cs
- SecureUICommand.cs
- ConnectionsZone.cs
- RowToParametersTransformer.cs