Package com.google.crypto.tink.tinkkey
Class KeyAccess
- java.lang.Object
-
- com.google.crypto.tink.tinkkey.KeyAccess
-
@Immutable public final class KeyAccess extends java.lang.ObjectAn access token forTinkKey. Access to Tink keys is governed byKeyHandle. ATinkKeywhich does not have a secret should be accessible by tokens generated byKeyAccess.publicAccess(). ATinkKeywith a secret should need a token generated bySecretKeyAccess.secretAccess().Do not use this in new code. Instead, use
SecretKeyAccessand these facilities.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanAccessSecret()Returns true if theKeyAccessinstance grants access to a key's secretstatic KeyAccesspublicAccess()Returns aKeyAccessinstance wherecanAccessSecret()returns false.
-
-
-
Method Detail
-
publicAccess
public static KeyAccess publicAccess()
Returns aKeyAccessinstance wherecanAccessSecret()returns false.
-
canAccessSecret
public boolean canAccessSecret()
Returns true if theKeyAccessinstance grants access to a key's secret
-
-