break;
case EncryptionOnly:
this.eo = new S3CryptoModuleEO(kms, s3, credentialsProvider,
encryptionMaterialsProvider,
cryptoConfig);
CryptoConfiguration aeConfig = cryptoConfig.clone();
try {
aeConfig.setCryptoMode(AuthenticatedEncryption);
} catch(UnsupportedOperationException ex) {
// BC not available during runtime; but EO can still work.
// Hence ignoring.
}
this.ae = new S3CryptoModuleAE(kms, s3, credentialsProvider,
encryptionMaterialsProvider,
aeConfig.readOnly());
break;
default:
throw new IllegalStateException();
}
}