Package com.google.crypto.tink
Interface KmsClient
-
- All Known Implementing Classes:
AndroidKeystoreKmsClient
public interface KmsClientA KmsClient knows how to produce primitives backed by keys stored in remote KMS services.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandoesSupport(java.lang.String keyUri)AeadgetAead(java.lang.String keyUri)Gets anAeadbacked bykeyUri.KmsClientwithCredentials(java.lang.String credentialPath)Loads the credentials incredentialPath.KmsClientwithDefaultCredentials()Loads the default credentials.
-
-
-
Method Detail
-
doesSupport
boolean doesSupport(java.lang.String keyUri)
- Returns:
- true if this client does support
keyUri
-
withCredentials
KmsClient withCredentials(java.lang.String credentialPath) throws java.security.GeneralSecurityException
Loads the credentials incredentialPath. IfcredentialPathis null, loads the default credentials.- Throws:
java.security.GeneralSecurityException
-
withDefaultCredentials
KmsClient withDefaultCredentials() throws java.security.GeneralSecurityException
Loads the default credentials.- Throws:
java.security.GeneralSecurityException
-
getAead
Aead getAead(java.lang.String keyUri) throws java.security.GeneralSecurityException
Gets anAeadbacked bykeyUri.- Throws:
java.security.GeneralSecurityException- if the URI is not supported or invalid
-
-