public final class CleartextKeysetHandle extends Object
Reading or writing cleartext keysets is a bad practice, usage of this API should be
restricted. Users can read encrypted keysets using KeysetHandle.read(com.google.crypto.tink.KeysetReader, com.google.crypto.tink.Aead).
| Modifier and Type | Method and Description |
|---|---|
static KeysetHandle |
fromKeyset(Keyset keyset)
Deprecated.
Instead, use a
KeysetHandle.Builder. |
static Keyset |
getKeyset(KeysetHandle keysetHandle)
Deprecated.
Instead, call "KeysetHandle.getAt()" to get information about individual keys or
TinkProtoKeysetFormat if you need a serialized keyset.
|
static KeysetHandle |
parseFrom(byte[] serialized)
Deprecated.
Call
TinkProtoKeysetFormat.parseKeyset(serialized,
InsecureSecretKeyAccess.get()) which has the same semantics. |
static KeysetHandle |
read(KeysetReader reader) |
static KeysetHandle |
read(KeysetReader reader,
Map<String,String> monitoringAnnotations)
Deprecated.
Instead, use a
KeysetHandle.Builder. |
static void |
write(KeysetHandle handle,
KeysetWriter keysetWriter)
|
@Deprecated public static final KeysetHandle parseFrom(byte[] serialized) throws GeneralSecurityException
TinkProtoKeysetFormat.parseKeyset(serialized,
InsecureSecretKeyAccess.get()) which has the same semantics.KeysetHandle from serialized that is a serialized KeysetGeneralSecurityExceptionpublic static KeysetHandle read(KeysetReader reader) throws GeneralSecurityException, IOException
KeysetHandle from a Keyset read with reader.GeneralSecurityException - when the keyset is invalid or can't be read.IOException@Deprecated public static KeysetHandle read(KeysetReader reader, Map<String,String> monitoringAnnotations) throws GeneralSecurityException, IOException
KeysetHandle.Builder.KeysetHandle from a KeysetReader.
The additional monitoringAnnotations are used for monitoring, and will be passed to
the MonitoringClient.
GeneralSecurityException - when the keyset is invalid or cannot be read.IOException@Deprecated public static Keyset getKeyset(KeysetHandle keysetHandle)
keysetHandle.@Deprecated public static KeysetHandle fromKeyset(Keyset keyset) throws GeneralSecurityException
KeysetHandle.Builder.keyset.GeneralSecurityExceptionpublic static void write(KeysetHandle handle, KeysetWriter keysetWriter) throws IOException
IOException