org.apache.sshd.common
Interface Cipher

All Known Implementing Classes:
AES128CBC, AES192CBC, AES256CBC, BaseCipher, BlowfishCBC, CipherNone, TripleDESCBC

public interface Cipher

Wrapper for a cryptographic cipher, used either for encryption or decryption.

Author:
Apache MINA SSHD Project

Nested Class Summary
static class Cipher.Mode
           
 
Method Summary
 int getBlockSize()
          Retrieves the block size for this cipher
 int getIVSize()
          Retrieves the size of the initialization vector
 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.
 

Method Detail

getIVSize

int getIVSize()
Retrieves the size of the initialization vector

Returns:

getBlockSize

int getBlockSize()
Retrieves the block size for this cipher

Returns:

init

void init(Cipher.Mode mode,
          byte[] key,
          byte[] iv)
          throws Exception
Initialize the cipher for encryption or decryption with the given private key and initialization vector

Parameters:
mode -
key -
iv -
Throws:
Exception

update

void update(byte[] input,
            int inputOffset,
            int inputLen)
            throws Exception
Performs in-place encryption or decryption on the given data.

Parameters:
input -
inputOffset -
inputLen -
Throws:
Exception


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.