public class SingleKeyManagementServiceFactory
extends java.lang.Object
implements com.github.ambry.router.KeyManagementServiceFactory<javax.crypto.spec.SecretKeySpec>
SingleKeyManagementServiceFactory
specific implementation of KeyManagementServiceFactory
.
Sets up all the supporting cast required for the operation of SingleKeyManagementService
and returns a new instance on
getKeyManagementService()
. The default key that the SingleKeyManagementService
returns for any
KeyManagementService.getKey(short, short)
is fetched from config "kms.default.container.key" which has to
be hex string.Constructor and Description |
---|
SingleKeyManagementServiceFactory(com.github.ambry.config.VerifiableProperties verifiableProperties,
java.lang.String clusterName,
com.codahale.metrics.MetricRegistry registry)
Instantiates
SingleKeyManagementServiceFactory |
Modifier and Type | Method and Description |
---|---|
com.github.ambry.router.KeyManagementService<javax.crypto.spec.SecretKeySpec> |
getKeyManagementService() |
public SingleKeyManagementServiceFactory(com.github.ambry.config.VerifiableProperties verifiableProperties, java.lang.String clusterName, com.codahale.metrics.MetricRegistry registry)
SingleKeyManagementServiceFactory
verifiableProperties
- VerifiableProperties
to load configs fromclusterName
- Cluster name for which KeyManagementService
is requested forregistry
- MetricRegistry
to usepublic com.github.ambry.router.KeyManagementService<javax.crypto.spec.SecretKeySpec> getKeyManagementService() throws java.security.GeneralSecurityException
getKeyManagementService
in interface com.github.ambry.router.KeyManagementServiceFactory<javax.crypto.spec.SecretKeySpec>
java.security.GeneralSecurityException