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

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

Go to download

The Long Term Stable (LTS) Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains the JCA/JCE provider and low-level API for the BC LTS version 2.73.7 for Java 8 and later.

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

/**
 * Ciphers producing a key stream which can be reset to particular points in the stream implement this.
 */
public interface SkippingCipher
{
    /**
     * Skip numberOfBytes forwards, or backwards.
     *
     * @param numberOfBytes the number of bytes to skip (positive forward, negative backwards).
     * @return the number of bytes actually skipped.
     * @throws java.lang.IllegalArgumentException if numberOfBytes is an invalid value.
     */
    long skip(long numberOfBytes);

    /**
     * Reset the cipher and then skip forward to a given position.
     *
     * @param position the number of bytes in to set the cipher state to.
     * @return the byte position moved to.
     */
    long seekTo(long position);

    /**
     * Return the current "position" of the cipher
     *
     * @return the current byte position.
     */
    long getPosition();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy