public TinkKey getKey(KeyAccess access) throws GeneralSecurityException {
    checkAccess(access);
    return key;
  }
Returns the underlying {@link TinkKey} key if {@code access} is a {@link SecretKeyAccess} and
the key has a secret, or if the key does not have a secret, otherwise throws a {@link
GeneralSecurityException}.
java_src/src/main/java/com/google/crypto/tink/tinkkey/KeyHandle.java