public class

BaseCipher

extends Object
implements Cipher
java.lang.Object
   ↳ net.schmizz.sshj.transport.cipher.BaseCipher
Known Direct Subclasses

Class Overview

Base class for all Cipher implementations delegating to the JCE provider.

Summary

Fields
private final String algorithm
private final int bsize
private Cipher cipher
private final int ivsize
private final String transformation
Public Constructors
BaseCipher(int ivsize, int bsize, String algorithm, String transformation)
Public Methods
int getBlockSize()
int getIVSize()
void init(Cipher.Mode mode, byte[] key, byte[] iv)
Initialize the cipher for encryption or decryption with the given private key and initialization vector
void update(byte[] input, int inputOffset, int inputLen)
Performs in-place encryption or decryption on the given data.
[Expand]
Inherited Methods
From class java.lang.Object
From interface net.schmizz.sshj.transport.cipher.Cipher

Fields

private final String algorithm

private final int bsize

private Cipher cipher

private final int ivsize

private final String transformation

Public Constructors

public BaseCipher (int ivsize, int bsize, String algorithm, String transformation)

Parameters
ivsize
bsize
algorithm
transformation

Public Methods

public int getBlockSize ()

public int getIVSize ()

public void init (Cipher.Mode mode, byte[] key, byte[] iv)

Initialize the cipher for encryption or decryption with the given private key and initialization vector

Parameters
mode Whether this instance wil encrypt or decrypt
key The key for the cipher
iv Initialization vector

public void update (byte[] input, int inputOffset, int inputLen)

Performs in-place encryption or decryption on the given data.

Parameters
input The subject
inputOffset Offset at which to start
inputLen Number of bytes starting at inputOffset