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

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

Go to download

The FIPS 140-2 Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms certified to FIPS 140-2 level 1. This jar contains the debug version JCE provider and low-level API for the BC-FJA version 1.0.2.3, FIPS Certificate #3514. Please note the debug jar is not certified.

There is a newer version: 2.0.0
Show newest version
package org.bouncycastle.crypto;

/**
 * Base interface for a cipher which produces encrypted/decrypted output.
 *
 * @param  the parameters type for the output cipher.
 */
public interface OutputCipher
{
    /**
     * Return the parameters for this cipher.
     *
     * @return the cipher's parameters.
     */
    T getParameters();

    /**
     * Return the size of the output buffer required for a write() plus a
     * close() with the write() being passed inputLen bytes.
     * 

* The returned size may be dependent on the initialisation of this cipher * and may not be accurate once subsequent input data is processed as the cipher may * add, add or remove padding, as it sees fit. *

* @param inputLen the length of the input. * @return the space required to accommodate a call to processBytes and doFinal * with inputLen bytes of input. */ int getMaxOutputSize(int inputLen); /** * Return the size of the output buffer required for a write() with the write() being * passed inputLen bytes and just updating the cipher output. *

* The returned size may be dependent on the state of this cipher. *

* @param inputLen the length of the input. * @return the space required to accommodate a call to processBytes with inputLen bytes of input. */ int getUpdateOutputSize(int inputLen); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy