org.bouncycastle.crypto.EncapsulatedSecretExtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bc-fips Show documentation
Show all versions of bc-fips Show documentation
The FIPS 140-3 Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms certified to FIPS 140-3 level 1. This jar contains JCE provider and low-level API for the BC-FJA version 2.0.0, FIPS Certificate #4743. Please see certificate for certified platform details.
package org.bouncycastle.crypto;
/**
* Interface describing an encapsulated secret extractor. These represent algorithms such as KTS.
*
* @param the type for the parameters used by this extractor.
*/
public interface EncapsulatedSecretExtractor
{
/**
* Return the parameters being used by this extractor.
*
* @return the extractor parameters.
*/
T getParameters();
/**
* Open up an encapsulation and extract the key material it contains.
*
* @param encapsulation the data that is carrying the secret.
* @param offset the offset into encapsulation that the actual encapsulation starts at.
* @param length the length of the encapsulation stored in the encapsulation array.
* @return the secret and the data representing the encapsulation.
* @throws InvalidCipherTextException if there is an issue opening the encapsulation.
*/
SecretWithEncapsulation extractSecret(final byte[] encapsulation, final int offset, final int length)
throws InvalidCipherTextException;
}