org.interledger.crypto.EncryptionAlgorithm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connector-crypto Show documentation
Show all versions of connector-crypto Show documentation
Encryption, decryption, signing and verification services using various underlying key-stores.
The newest version!
package org.interledger.crypto;
/**
* Defines supported encryption algorithms.
*/
public enum EncryptionAlgorithm {
// Google KMS
GOOGLE_SYMMETRIC(CryptoConstants.GOOGLE_SYMMETRIC),
AES_GCM(CryptoConstants.AES_GCM);
private final String algorithm;
EncryptionAlgorithm(final String algorithm) {
this.algorithm = algorithm;
}
static EncryptionAlgorithm fromEncodedValue(final String encodedValue) {
switch (encodedValue.toLowerCase()) {
case CryptoConstants.GOOGLE_SYMMETRIC: {
return GOOGLE_SYMMETRIC;
}
case CryptoConstants.AES_GCM: {
return AES_GCM;
}
default: {
throw new RuntimeException("Invalid Encryption Algorithm: " + encodedValue);
}
}
}
public String getAlgorithm() {
return algorithm;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy