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)
Returns a KeysetHandle for
keyset. |
static Keyset |
getKeyset(KeysetHandle keysetHandle) |
static KeysetHandle |
parseFrom(byte[] serialized)
Deprecated.
use
read(com.google.crypto.tink.KeysetReader) instead |
static KeysetHandle |
read(KeysetReader reader) |
static KeysetHandle |
read(KeysetReader reader,
Map<String,String> monitoringAnnotations)
Creates a
KeysetHandle from a KeysetReader. |
static void |
write(KeysetHandle handle,
KeysetWriter keysetWriter)
|
@Deprecated public static final KeysetHandle parseFrom(byte[] serialized) throws GeneralSecurityException
read(com.google.crypto.tink.KeysetReader) insteadKeysetHandle 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@Alpha public static KeysetHandle read(KeysetReader reader, Map<String,String> monitoringAnnotations) throws GeneralSecurityException, IOException
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.IOExceptionpublic static Keyset getKeyset(KeysetHandle keysetHandle)
keysetHandle.public static KeysetHandle fromKeyset(Keyset keyset) throws GeneralSecurityException
keyset.GeneralSecurityExceptionpublic static void write(KeysetHandle handle, KeysetWriter keysetWriter) throws IOException
IOException