@NotThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) final class Type0RaesReadOnlyFile extends RaesReadOnlyFile
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
footer
The footer of the data envelope containing the authentication codes.
|
private Type0RaesParameters.KeyStrength |
keyStrength
The key strength.
|
private KeyParameter |
sha256MacParam
The key parameter required to init the SHA-256 Message Authentication
Code (HMAC).
|
delegate| Constructor and Description |
|---|
Type0RaesReadOnlyFile(ReadOnlyFile rof,
Type0RaesParameters param) |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate()
Authenticates all encrypted data in this read only file.
|
Type0RaesParameters.KeyStrength |
getKeyStrength()
Returns the key strength which is actually used to decrypt the data
of the RAES file.
|
private void |
paranoidWipe(byte[] pwd)
Wipe the given array.
|
getInstance, getInstance, readUByte, readUInt, readUShortclose, computeMac, getFilePointer, init, length, read, read, seektoStringread, readFully, readFullyprivate final byte[] footer
private final Type0RaesParameters.KeyStrength keyStrength
private final KeyParameter sha256MacParam
Type0RaesReadOnlyFile(ReadOnlyFile rof, Type0RaesParameters param) throws IOException
IOExceptionpublic void authenticate()
throws IOException
RaesReadOnlyFileThis is the second, optional step of authentication. The first, mandatory step is to compute the cipher key and cipher text length only and must already have been successfully completed in the constructor.
authenticate in class RaesReadOnlyFileRaesAuthenticationException - If the computed MAC does not match
the MAC declared in the RAES file.IOException - On any I/O related issue.public Type0RaesParameters.KeyStrength getKeyStrength()
RaesReadOnlyFilegetKeyStrength in class RaesReadOnlyFileprivate void paranoidWipe(byte[] pwd)
Copyright © 2004-2011 Schlichtherle IT Services. All Rights Reserved.