Interface EncryptionScheme

All Known Implementing Classes:
AbstractEncryptionScheme, OpenSSLEncryptionScheme, PBES1EncryptionScheme, PBES2EncryptionScheme

public interface EncryptionScheme
Describes a password-based encryption scheme.
Version:
$Revision: 2744 $
Author:
Middleware Services
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    decrypt(byte[] ciphertext)
    Decrypts the given ciphertext into plaintext using the derived key.
    void
    Decrypts ciphertext from an input stream into plaintext in the output stream.
    byte[]
    encrypt(byte[] plaintext)
    Encrypts the given plaintext bytes into a byte array of ciphertext using the derived key.
    void
    Encrypts the data in the given plaintext input stream into ciphertext in the output stream.
  • Method Details

    • encrypt

      byte[] encrypt(byte[] plaintext)
      Encrypts the given plaintext bytes into a byte array of ciphertext using the derived key.
      Parameters:
      plaintext - Input plaintext bytes.
      Returns:
      Ciphertext resulting from plaintext encryption.
    • encrypt

      void encrypt(InputStream in, OutputStream out) throws IOException
      Encrypts the data in the given plaintext input stream into ciphertext in the output stream. Use EncodingOutputStream to produce ciphertext bytes that encoded as a string data in the output stream.
      Parameters:
      in - Input stream of plaintext.
      out - Output stream of ciphertext.
      Throws:
      IOException - On stream read/write errors.
    • decrypt

      byte[] decrypt(byte[] ciphertext)
      Decrypts the given ciphertext into plaintext using the derived key.
      Parameters:
      ciphertext - Input ciphertext bytes.
      Returns:
      Plaintext resulting from ciphertext decryption.
    • decrypt

      void decrypt(InputStream in, OutputStream out) throws IOException
      Decrypts ciphertext from an input stream into plaintext in the output stream. Use DecodingInputStream to handle input ciphertext encoded as string data.
      Parameters:
      in - Input stream of ciphertext.
      out - Output stream of plaintext.
      Throws:
      IOException - On stream read/write errors.