private static String stripPrefix(String prefix, String str) throws GeneralSecurityException {
    if (!str.startsWith(prefix)) {
      throw new GeneralSecurityException("Invalid key uri: " + str);
    }
    return str.substring(prefix.length());
  }
A client for testing.

<p>The client supports all key uris which start with "tinkey-test-kms-client://" followed by a
JSON-encoded AEAD keyset. It will use this Aead when "getAead" is called. As credentials, it must
be given a file which starts whose contents are "VALID CREDENTIALS".
tools/tinkey/src/main/java/com/google/crypto/tink/tinkey/TinkeyTestKmsClient.java