Enum Class SecurityAlgorithm
- All Implemented Interfaces:
Serializable,Comparable<SecurityAlgorithm>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSymmetric Encryption; transformation to be used withCipher.getInstance(String).Symmetric Encryption; transformation to be used withCipher.getInstance(String).Symmetric Signature; transformation to be used withMac.getInstance(String).Symmetric Signature; transformation to be used withMac.getInstance(String).Asymmetric Key WrapAsymmetric Key WrapKey DerivationKey DerivationAsymmetric Encryption; transformation to be used withCipher.getInstance(String).Asymmetric Encryption; transformation to be used withCipher.getInstance(String).Asymmetric Encryption; transformation to be used withCipher.getInstance(String).Asymmetric Signature; transformation to be used withSignature.getInstance(String).Asymmetric Signature; transformation to be used withSignature.getInstance(String).Asymmetric Signature; transformation to be used withSignature.getInstance(String).Cryptographic Hash; transformation to be used withMessageDigest.getInstance(String).Cryptographic Hash; transformation to be used withMessageDigest.getInstance(String). -
Method Summary
Modifier and TypeMethodDescriptionstatic SecurityAlgorithmgetUri()static SecurityAlgorithmReturns the enum constant of this class with the specified name.static SecurityAlgorithm[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
None
-
HmacSha1
Symmetric Signature; transformation to be used withMac.getInstance(String). -
HmacSha256
Symmetric Signature; transformation to be used withMac.getInstance(String). -
Aes128
Symmetric Encryption; transformation to be used withCipher.getInstance(String). -
Aes256
Symmetric Encryption; transformation to be used withCipher.getInstance(String). -
RsaSha1
Asymmetric Signature; transformation to be used withSignature.getInstance(String). -
RsaSha256
Asymmetric Signature; transformation to be used withSignature.getInstance(String). -
RsaSha256Pss
Asymmetric Signature; transformation to be used withSignature.getInstance(String).Requires Bouncy Castle installed as a Security Provider.
-
Rsa15
Asymmetric Encryption; transformation to be used withCipher.getInstance(String). -
RsaOaepSha1
Asymmetric Encryption; transformation to be used withCipher.getInstance(String). -
RsaOaepSha256
Asymmetric Encryption; transformation to be used withCipher.getInstance(String).Important note: the transformation used is "RSA/ECB/OAEPWithSHA256AndMGF1Padding" as opposed to "RSA/ECB/OAEPWithSHA-256AndMGF1Padding".
While similar, the former is provided by Bouncy Castle whereas the latter is provided by SunJCE.
This is important because the BC version uses SHA256 in the padding while the SunJCE version uses Sha1.
-
KwRsa15
Asymmetric Key Wrap -
KwRsaOaep
Asymmetric Key Wrap -
PSha1
Key Derivation -
PSha256
Key Derivation -
Sha1
Cryptographic Hash; transformation to be used withMessageDigest.getInstance(String). -
Sha256
Cryptographic Hash; transformation to be used withMessageDigest.getInstance(String).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getUri
- Returns:
- The URI identifying this security algorithm.
-
getTransformation
- Returns:
- The transformation string to use with the appropriate provider SPI.
-
fromUri
- Throws:
UaException
-