public class EncryptionAlgorithms extends Object
EncryptionAlgorithm instance.| Constructor and Description |
|---|
EncryptionAlgorithms() |
| Modifier and Type | Method and Description |
|---|---|
static SymmetricAlgorithmBuilder |
aes()
Creates a new builder for AES (128b) encryption.
|
static SymmetricAlgorithmBuilder |
aes(byte[] keyPassword)
Creates a new builder for AES (128b) encryption.
|
static SymmetricAlgorithmBuilder |
aes(String keyPassword)
Creates a new builder for AES (128b) encryption.
|
static SymmetricAlgorithmBuilder |
aes256()
Creates a new builder for AES (256b) encryption.
|
static SymmetricAlgorithmBuilder |
aes256(byte[] keyPassword)
Creates a new builder for AES (256b) encryption.
|
static SymmetricAlgorithmBuilder |
aes256(String keyPassword)
Creates a new builder for AES (256b) encryption.
|
static void |
defaultFactories(EncryptionFactories factories)
Sets a new global factories for encryption engines.
|
static RSAAlgorithmBuilder |
rsa()
Creates a new builder for RSA encryption.
|
static SymmetricAlgorithmBuilder |
tripleDes()
Creates a new builder for 3DES encryption.
|
static SymmetricAlgorithmBuilder |
tripleDes(byte[] keyPassword)
Creates a new builder for 3DES encryption.
|
static SymmetricAlgorithmBuilder |
tripleDes(String keyPassword)
Creates a new builder for 3DES encryption.
|
public static void defaultFactories(EncryptionFactories factories)
CryptoFactories.factories - factories to be setpublic static SymmetricAlgorithmBuilder aes(byte[] keyPassword) throws IllegalArgumentException
Creates a new builder for AES (128b) encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms).
keyPassword - password for key derivationIllegalArgumentException - exception if passed key password is nullpublic static SymmetricAlgorithmBuilder aes(String keyPassword) throws IllegalArgumentException
Creates a new builder for AES (128b) encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms).
keyPassword - password for key derivationIllegalArgumentException - exception if passed key password is nullpublic static SymmetricAlgorithmBuilder aes()
Creates a new builder for AES (128b) encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms).
Note that during build process, you must call one of methods for specifying encryption key. The methods are
IllegalArgumentException - exception if passed key password is nullpublic static SymmetricAlgorithmBuilder aes256(byte[] keyPassword) throws IllegalArgumentException
Creates a new builder for AES (256b) encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms).
Note that if you use default CryptoFactories, you may need JCE installed for AES-256.
keyPassword - password for key derivationIllegalArgumentException - exception if passed key password is nullpublic static SymmetricAlgorithmBuilder aes256(String keyPassword) throws IllegalArgumentException
Creates a new builder for AES (256b) encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms) .
Note that if you use default CryptoFactories, you may need JCE installed for AES-256.
keyPassword - password for key derivationIllegalArgumentException - exception if passed key password is nullpublic static SymmetricAlgorithmBuilder aes256()
Creates a new builder for AES (256b) encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms).
Note that during build process, you must call one of methods for specifying encryption key. The methods are
IllegalArgumentException - exception if passed key password is nullpublic static SymmetricAlgorithmBuilder tripleDes(byte[] keyPassword) throws IllegalArgumentException
Creates a new builder for 3DES encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms).
keyPassword - password for key derivationIllegalArgumentException - exception if passed key password is nullpublic static SymmetricAlgorithmBuilder tripleDes(String keyPassword) throws IllegalArgumentException
Creates a new builder for 3DES encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms).
keyPassword - password for key derivationIllegalArgumentException - exception if passed key password is nullpublic static SymmetricAlgorithmBuilder tripleDes()
Creates a new builder for 3DES encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms).
Note that during build process, you must call one of methods for specifying encryption key. The methods are
IllegalArgumentException - exception if passed key password is nullpublic static RSAAlgorithmBuilder rsa()
Creates a new builder for RSA encryption. Engine for encryption is dependent on
defaultFactories(EncryptionFactories) which defaults to CryptoFactories
that uses standard Java API implementations (you can read CryptoFactories javadoc that
describes what parameters it uses for encryption algorithms).
Copyright © 2019. All rights reserved.