public enum SecurityPolicy extends Enum<SecurityPolicy>
for instantiating cryptographics objects| Enum Constant and Description |
|---|
AES128_SHA256_RSAOAEP |
AES256_SHA256_RSAPSS |
BASIC128RSA15
Deprecated.
This SecurityPolicy is Deprecated in the OPC UA Specification. Using this
SecurityPolicy in applications is not recommended and it should be disabled by
default in applications that allow choosing which SecurityPolicies to use.
|
BASIC256
Deprecated.
This SecurityPolicy is Deprecated in the OPC UA Specification. Using this
SecurityPolicy in applications is not recommended and it should be disabled by
default in applications that allow choosing which SecurityPolicies to use.
|
BASIC256SHA256 |
NONE |
| Modifier and Type | Field and Description |
|---|---|
static Set<SecurityPolicy> |
ALL_SECURE_101
Deprecated.
since the set contains deprecated policies.
|
static Set<SecurityPolicy> |
ALL_SECURE_102
Deprecated.
since the set contains deprecated policies.
|
static Set<SecurityPolicy> |
ALL_SECURE_103
Deprecated.
since the set contains deprecated policies.
|
static Set<SecurityPolicy> |
ALL_SECURE_104
Policies defined in OPC UA 1.04.
|
static Set<SecurityPolicy> |
ALL_SECURE_105
Policies defined in OPC UA 1.05.
|
static SecurityPolicy[] |
EMPTY_ARRAY |
| Modifier and Type | Method and Description |
|---|---|
static SecurityPolicy[] |
getAllSecurityPolicies()
Deprecated.
use
values() instead, if needed, but note that it too
includes deprecated policies. |
SecurityAlgorithm |
getAsymmetricEncryptionAlgorithm()
Getter for the field
asymmetricEncryptionAlgorithm. |
SecurityAlgorithm |
getAsymmetricKeyWrapAlgorithm()
Getter for the field
asymmetricKeyWrapAlgorithm. |
SecurityAlgorithm |
getAsymmetricSignatureAlgorithm()
Getter for the field
asymmetricSignatureAlgorithm. |
String |
getDisplayName()
Returns a nicer human-readable name for this
SecurityPolicy. |
byte[] |
getEncodedPolicyUri()
Getter for the field
encodedPolicyUri. |
int |
getEncryptionBlockSize()
Getter for the field
encryptionBlockSize. |
int |
getEncryptionKeySize()
Getter for the field
encryptionKeySize. |
SecurityAlgorithm |
getKeyDerivationAlgorithm()
Getter for the field
keyDerivationAlgorithm. |
int |
getMaxAsymmetricKeyLength()
Getter for the field
maxAsymmetricKeyLength. |
int |
getMinAsymmetricKeyLength()
Getter for the field
minAsymmetricKeyLength. |
String |
getPolicyUri()
Getter for the field
policyUri. |
int |
getSecureChannelNonceLength() |
static SecurityPolicy |
getSecurityPolicy(String securityPolicyUri)
Get security policy by policy uri.
|
int |
getSignatureKeySize()
Getter for the field
signatureKeySize. |
SecurityAlgorithm |
getSymmetricEncryptionAlgorithm()
Getter for the field
symmetricEncryptionAlgorithm. |
SecurityAlgorithm |
getSymmetricSignatureAlgorithm()
Getter for the field
symmetricSignatureAlgorithm. |
int |
getSymmetricSignatureSize()
Getter for the field
symmetricSignatureSize. |
boolean |
isUsableWith(Cert cert)
Checks if a certificate is useable for this security policy.
|
String |
toString() |
static SecurityPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SecurityPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SecurityPolicy NONE
@Deprecated public static final SecurityPolicy BASIC128RSA15
@Deprecated public static final SecurityPolicy BASIC256
public static final SecurityPolicy BASIC256SHA256
public static final SecurityPolicy AES128_SHA256_RSAOAEP
public static final SecurityPolicy AES256_SHA256_RSAPSS
@Deprecated public static final Set<SecurityPolicy> ALL_SECURE_101
BASIC128RSA15 and BASIC256. This
set in unmodifiable.@Deprecated public static final Set<SecurityPolicy> ALL_SECURE_102
BASIC128RSA15, BASIC256 and
BASIC256SHA256. This set in unmodifiable.@Deprecated public static final Set<SecurityPolicy> ALL_SECURE_103
BASIC128RSA15, BASIC256 and
BASIC256SHA256. This set in unmodifiable. Note that this set contains same policies as
in ALL_SECURE_102.public static final Set<SecurityPolicy> ALL_SECURE_104
BASIC256SHA256,
AES128_SHA256_RSAOAEP and AES256_SHA256_RSAPSS. This set in unmodifiable.public static final Set<SecurityPolicy> ALL_SECURE_105
BASIC256SHA256,
AES128_SHA256_RSAOAEP and AES256_SHA256_RSAPSS i.e. same as
ALL_SECURE_104. This set in unmodifiable.public static final SecurityPolicy[] EMPTY_ARRAY
public static SecurityPolicy[] values()
for (SecurityPolicy c : SecurityPolicy.values()) System.out.println(c);
public static SecurityPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@Deprecated public static SecurityPolicy[] getAllSecurityPolicies()
values() instead, if needed, but note that it too
includes deprecated policies.public static SecurityPolicy getSecurityPolicy(String securityPolicyUri) throws ServiceResultException
securityPolicyUri - security policy uriServiceResultException - Bad_SecurityPolicyRejected if
policy is unknownpublic SecurityAlgorithm getAsymmetricEncryptionAlgorithm()
Getter for the field asymmetricEncryptionAlgorithm.
SecurityAlgorithm object.public SecurityAlgorithm getAsymmetricKeyWrapAlgorithm()
Getter for the field asymmetricKeyWrapAlgorithm.
SecurityAlgorithm object.public SecurityAlgorithm getAsymmetricSignatureAlgorithm()
Getter for the field asymmetricSignatureAlgorithm.
SecurityAlgorithm object.public String getDisplayName()
SecurityPolicy. Effectively this is the
part of the getPolicyUri() after the '#' character.public byte[] getEncodedPolicyUri()
Getter for the field encodedPolicyUri.
public int getEncryptionBlockSize()
Getter for the field encryptionBlockSize.
public int getEncryptionKeySize()
Getter for the field encryptionKeySize.
public SecurityAlgorithm getKeyDerivationAlgorithm()
Getter for the field keyDerivationAlgorithm.
SecurityAlgorithm object.public int getMaxAsymmetricKeyLength()
Getter for the field maxAsymmetricKeyLength.
public int getMinAsymmetricKeyLength()
Getter for the field minAsymmetricKeyLength.
public int getSecureChannelNonceLength()
public int getSignatureKeySize()
Getter for the field signatureKeySize.
public SecurityAlgorithm getSymmetricEncryptionAlgorithm()
Getter for the field symmetricEncryptionAlgorithm.
SecurityAlgorithm object.public SecurityAlgorithm getSymmetricSignatureAlgorithm()
Getter for the field symmetricSignatureAlgorithm.
SecurityAlgorithm object.public int getSymmetricSignatureSize()
Getter for the field symmetricSignatureSize.
public boolean isUsableWith(Cert cert)
cert - a Cert object.public String toString()
toString in class Enum<SecurityPolicy>Copyright © 2026. All rights reserved.