![JAR search and dependency download from the Maven repository](/logo.png)
de.schlichtherle.truezip.crypto.raes.Constants Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truezip-driver-tzp Show documentation
Show all versions of truezip-driver-tzp Show documentation
The file system driver family for RAES encrypted ZIP alias
ZIP.RAES alias TZP files.
Add the JAR artifact of this module to the run time class path to
make its file system drivers available for service location in the
client API modules.
The newest version!
/*
* Copyright (C) 2005-2015 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package de.schlichtherle.truezip.crypto.raes;
/**
* This interfaces contains constants used to read or write files
* according to the Random Access Encryption Specification (Constants).
* Public classes must not implement this interface - otherwise the
* constants become part of the public API.
*
* @author Christian Schlichtherle
*/
interface Constants {
/**
* The signature of any Constants compatible content in little endian format
* ({@code "Constants"} as a US-ASCII character sequence).
*/
int SIGNATURE = 'R' | (('A' | (('E' | ('S' << 8)) << 8)) << 8);
int LEAD_IN_LENGTH =
4 + // SIGNATURE
1; // Envelope type
/**
* The data envelope type used for password based encryption
* with the same salt length as the cipher key length.
*/
byte ENVELOPE_TYPE_0 = 0;
/** The length of the header before the salt and the encrypted data. */
int ENVELOPE_TYPE_0_HEADER_LEN_WO_SALT =
LEAD_IN_LENGTH +
1 + // Cipher and MAC key strength.
2; // Iteration count
// The salt which's length is the cipher key length.
// The ciphered data which has the same length as the plain data.
// The KLAC (first half of 256 bit SHA output = 128 bits).
// The MAC (first half of 256 bit SHA output = 128 bits).
/**
* The data envelope type reserved for certificate based encryption and
* authentication.
* This type is not yet specified, but reserved for future use.
*/
byte ENVELOPE_TYPE_1 = 1;
/**
* The block size of the Advanced Encryption Specification (AES) Algorithm
* in bits ({@value #AES_BLOCK_SIZE_BITS}).
*/
int AES_BLOCK_SIZE_BITS = 128;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy