/* Copyright (c) 1996-2020 The OPC Foundation. All rights reserved. The source code in this file is covered under a dual-license scenario: - RCL: for OPC Foundation members in good-standing - GPL V2: everybody else RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ GNU General Public License as published by the Free Software Foundation; version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 This source code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ namespace Opc.Ua { /// /// Defines constants for key security policies. /// public static class SecurityAlgorithms { /// /// The HMAC-SHA1 algorithm used to create symmetric key signatures. /// public const string HmacSha1 = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"; /// /// The HMAC-SHA256 algorithm used to create symmetric key signatures. /// public const string HmacSha256 = "http://www.w3.org/2000/09/xmldsig#hmac-sha256"; /// /// The RSA-SHA1 algorithm used to create asymmetric key signatures. /// public const string RsaSha1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"; /// /// The RSA-SHA256 algorithm used to create asymmetric key signatures. /// public const string RsaSha256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"; /// /// The RSA-PSS-SHA256 algorithm used to create asymmetric key signatures. /// public const string RsaPssSha256 = "http://opcfoundation.org/UA/security/rsa-pss-sha2-256"; /// /// The AES128 algorithm used to encrypt data. /// public const string Aes128 = "http://www.w3.org/2001/04/xmlenc#aes128-cbc"; /// /// The AES256 algorithm used to encrypt data. /// public const string Aes256 = "http://www.w3.org/2001/04/xmlenc#aes256-cbc"; /// /// The RSA-OAEP algorithm used to encrypt data. /// public const string RsaOaep = "http://www.w3.org/2001/04/xmlenc#rsa-oaep"; /// /// The RSA-OAEP-SHA256 algorithm used to encrypt data. /// public const string RsaOaepSha256 = "http://opcfoundation.org/UA/security/rsa-oaep-sha2-256"; /// /// The RSA-PKCSv1.5 algorithm used to encrypt data. /// public const string Rsa15 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5"; /// /// The RSA-PKCSv1.5 SHA256 algorithm used to encrypt data. /// public const string Rsa15Sha256 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5-sha2-256"; /// /// The RSA-OAEP algorithm used to encrypt keys. /// public const string KwRsaOaep = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"; /// /// The RSA-PKCSv1.5 algorithm used to encrypt keys. /// public const string KwRsa15 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5"; /// /// The P-SHA1 algorithm used to generate keys. /// public const string PSha1 = "http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/dk/p_sha1"; /// /// The P-SHA256 algorithm used to generate keys. /// public const string PSha256 = "http://opcfoundation.org/ua/security/p_sha2-256"; } /// /// Common profiles that UA applications may support. /// public static class Profiles { /// /// Communicates with UA TCP, UA Security and UA Binary. /// public const string UaTcpTransport = "http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary"; /// /// Communicates with UA TCP over secure Websockets, UA Security and UA Binary. /// public const string UaWssTransport = "http://opcfoundation.org/UA-Profile/Transport/uawss-uasc-uabinary"; /// /// Communicates with UA Binary over HTTPS. /// public const string HttpsBinaryTransport = "http://opcfoundation.org/UA-Profile/Transport/https-uabinary"; /// /// Communicates with PubSub for UADP transport protocol. /// public const string UadpTransport = "http://opcfoundation.org/UA-Profile/Transport/pubsub-udp-uadp"; /// /// An Issued User Token that complies with the JWT specification. /// public const string JwtUserToken = "http://opcfoundation.org/UA/UserToken#JWT"; /// /// Converts the URI to a URI that can be used for comparison. /// /// The profile URI. /// The normalixed URI. public static string NormalizeUri(string profileUri) { if (System.String.IsNullOrEmpty(profileUri)) { return profileUri; } return profileUri; } } }