Top Description Methods
org.bouncycastle.crypto

public Interface SkippingCipher

Known Direct Subinterfaces
org.bouncycastle.crypto.SkippingStreamCipher

Ciphers producing a key stream which can be reset to particular points in the stream implement this.

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the current byte position.
getPosition
()

Return the current "position" of the cipher

public long

Returns:

the byte position moved to.
seekTo
(long
the number of bytes in to set the cipher state to.
position
)

Reset the cipher and then skip forward to a given position.

public long

Returns:

the number of bytes actually skipped.
skip
(long
the number of bytes to skip (positive forward, negative backwards).
numberOfBytes
)

Skip numberOfBytes forwards, or backwards.

Method Detail

getPositionback to summary
public long getPosition()

Return the current "position" of the cipher

Returns:long

the current byte position.

seekToback to summary
public long seekTo(long position)

Reset the cipher and then skip forward to a given position.

Parameters
position:long

the number of bytes in to set the cipher state to.

Returns:long

the byte position moved to.

skipback to summary
public long skip(long numberOfBytes)

Skip numberOfBytes forwards, or backwards.

Parameters
numberOfBytes:long

the number of bytes to skip (positive forward, negative backwards).

Returns:long

the number of bytes actually skipped.

Exceptions
IllegalArgumentException:
if numberOfBytes is an invalid value.