public interface SerializableDatabase
Databases instantiate themselves from a stream and serialize to a stream, and need to be able to encrypt and decrypt data (e.g. Protected fields in KDBX format).
KDBX databases contain a header hash (i.e. a hash of the contents of
some portion of the StreamFormat they have been loaded from or saved to.
Which means that databases must support the setting of this value after the header
has been written on save, and reading the value after load to allow for integrity checking.
| Modifier and Type | Method and Description |
|---|---|
StreamEncryptor |
getEncryption() |
byte[] |
getHeaderHash() |
SerializableDatabase |
load(InputStream inputStream) |
void |
save(OutputStream outputStream) |
void |
setEncryption(StreamEncryptor encryption) |
void |
setHeaderHash(byte[] hash) |
SerializableDatabase load(InputStream inputStream) throws IOException
IOExceptionvoid save(OutputStream outputStream) throws IOException
IOExceptionStreamEncryptor getEncryption()
void setEncryption(StreamEncryptor encryption)
byte[] getHeaderHash()
void setHeaderHash(byte[] hash)
Copyright © 2016. All rights reserved.