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
- TextServicesDisplayAttribute.cs
- ImpersonateTokenRef.cs
- IndexedSelectQueryOperator.cs
- DateTimeConstantAttribute.cs
- FtpRequestCacheValidator.cs
- HasCopySemanticsAttribute.cs
- DnsEndpointIdentity.cs
- OciHandle.cs
- PngBitmapEncoder.cs
- TextCollapsingProperties.cs
- ContainerAction.cs
- Stream.cs
- PhysicalFontFamily.cs
- UnmanagedBitmapWrapper.cs
- Dictionary.cs
- SqlDataRecord.cs
- _LoggingObject.cs
- ToolstripProfessionalRenderer.cs
- PreviewKeyDownEventArgs.cs
- XPathNodeIterator.cs
- ExpandCollapsePattern.cs
- TextChangedEventArgs.cs
- FormatConvertedBitmap.cs
- PeerFlooder.cs
- ToolStripButton.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- VisualStyleInformation.cs
- CustomErrorsSectionWrapper.cs
- FormCollection.cs
- TrackingConditionCollection.cs
- ConfigXmlCDataSection.cs
- XPathCompileException.cs
- ClientCultureInfo.cs
- PropertyInformationCollection.cs
- CharacterHit.cs
- PagerStyle.cs
- BindingCompleteEventArgs.cs
- Shape.cs
- HashHelpers.cs
- Clock.cs
- PointAnimationUsingPath.cs
- CrossContextChannel.cs
- HttpHandlerActionCollection.cs
- WebBrowser.cs
- ReadOnlyHierarchicalDataSource.cs
- EnvironmentPermission.cs
- ToolStrip.cs
- QueryGeneratorBase.cs
- SymbolType.cs
- RayMeshGeometry3DHitTestResult.cs
- nulltextcontainer.cs
- ConvertersCollection.cs
- FontStyles.cs
- MSG.cs
- ParagraphResult.cs
- RsaSecurityToken.cs
- HttpResponse.cs
- AddInIpcChannel.cs
- CqlParser.cs
- ValidationPropertyAttribute.cs
- TextBox.cs
- BridgeDataReader.cs
- Stroke2.cs
- OletxDependentTransaction.cs
- TimeZone.cs
- InternalEnumValidator.cs
- DataSourceView.cs
- Brushes.cs
- SapiAttributeParser.cs
- Encoder.cs
- TextLineBreak.cs
- Material.cs
- WebPartMovingEventArgs.cs
- EnumDataContract.cs
- DebugView.cs
- UnsafeNativeMethodsMilCoreApi.cs
- XmlSerializerVersionAttribute.cs
- HtmlToClrEventProxy.cs
- HitTestFilterBehavior.cs
- PersonalizationProvider.cs
- Drawing.cs
- UshortList2.cs
- LogicalChannelCollection.cs
- XmlSiteMapProvider.cs
- StringResourceManager.cs
- InternalConfigHost.cs
- GroupBoxDesigner.cs
- TimersDescriptionAttribute.cs
- Size3D.cs
- ArcSegment.cs
- WindowsListViewItemCheckBox.cs
- AutomationPeer.cs
- NetworkStream.cs
- SqlProvider.cs
- ThousandthOfEmRealDoubles.cs
- DoubleAnimation.cs
- HttpConfigurationSystem.cs
- ByteStack.cs
- ContainerVisual.cs
- login.cs