Interface KmsClient

  • All Known Implementing Classes:
    AndroidKeystoreKmsClient

    public interface KmsClient
    A KmsClient knows how to produce primitives backed by keys stored in remote KMS services.
    Since:
    1.0.0
    • 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 in credentialPath. If credentialPath is 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 an Aead backed by keyUri.
        Throws:
        java.security.GeneralSecurityException - if the URI is not supported or invalid