public abstract class DecryptionTool extends Keyed<DecryptionTool>
Modifier and Type | Class and Description |
---|---|
static class |
DecryptionTool.DecryptionSetup
Blueprint of the Decryption Tool
|
Modifier and Type | Method and Description |
---|---|
abstract byte[] |
decryptFirstBytes(byte[] bits)
Decrypts the beginning of the file and returns its clear-text binary representation.
|
abstract java.io.InputStream |
decryptInputStream(java.io.InputStream is)
Wraps the source InputStream into deciphering input stream
|
static DecryptionTool |
get(Key<DecryptionTool> key)
Retrieves a Decryption Tool from DKV using a given key.
|
boolean |
isTransparent() |
static DecryptionTool |
make(DecryptionTool.DecryptionSetup ds)
Instantiates a Decryption Tool using a given Decryption Setup and installs it in DKV.
|
checksum_impl, checksum_impl, checksum, checksum, getKey, makeSchema, readAll_impl, readAll, remove_impl, remove_impl, remove_self_key_impl, remove, remove, remove, remove, remove, remove, removeQuietly, writeAll_impl, writeAll
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonBytes, toJsonString, write, writeExternal, writeJSON
public abstract byte[] decryptFirstBytes(byte[] bits)
bits
- the first chunk of data of the datafile. The input byte array can contain zero-bytes padding (eg. case of
DEFLATE compression in Zip files, the decompressed data can be smaller than the source chunk).
The implementation of the method should discard the padding (all zero bytes at the end of the array).public abstract java.io.InputStream decryptInputStream(java.io.InputStream is)
is
- InputStream created by ByteVec (H2O-specific behavior is expected!)public boolean isTransparent()
public static DecryptionTool get(Key<DecryptionTool> key)
key
- a valid DKV key or nullpublic static DecryptionTool make(DecryptionTool.DecryptionSetup ds)
ds
- decryption setup