All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.crypto.EncapsulatedSecretExtractor Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 2.0.0
Show newest version
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;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy