public static KeyHandle createFromKey(TinkKey key, KeyAccess access)
      throws GeneralSecurityException {
    KeyHandle result = new KeyHandle(key);
    result.checkAccess(access);
    return result;
  }
Returns a {@link KeyHandle} instance with {@code key} as the underlying {@link TinkKey} if the
caller provides the correct {@link KeyAccess} instance.

@throws GeneralSecurityException if {@code access} does not grant access to {@code key}
java_src/src/main/java/com/google/crypto/tink/tinkkey/KeyHandle.java