public class HmacBlockInputStream extends FilterInputStream
An HMac block consists of
The Class is initialised with an initial key digest. For each block this key is transformed using the (implied, starting from 0) block number and used as key for the block verification process. That process consists of digesting the block number, its length and its content.
KeePass streams are Little Endian.
in| Constructor and Description |
|---|
HmacBlockInputStream(byte[] key,
InputStream inputStream)
Create a (big endian) HMac Block input stream
|
HmacBlockInputStream(byte[] key,
InputStream inputStream,
boolean littleEndian)
Create an HMac Block input stream
|
| Modifier and Type | Method and Description |
|---|---|
int |
read() |
int |
read(@NotNull byte[] b) |
int |
read(@NotNull byte[] b,
int off,
int len) |
available, close, mark, markSupported, reset, skippublic HmacBlockInputStream(byte[] key,
InputStream inputStream)
throws IOException
key - the key digestinputStream - the stream to processIOException - when something horrid happenspublic HmacBlockInputStream(byte[] key,
InputStream inputStream,
boolean littleEndian)
throws IOException
key - the key digestinputStream - the stream to processlittleEndian - true if the stream is little endianIOException - when something horrid happenspublic int read(@NotNull
@NotNull byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(@NotNull
@NotNull byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionCopyright © 2025. All rights reserved.