Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.credentialsstorage
Interface Crypto

All Known Implementing Classes:
AESCrypto

public interface Crypto

Allows to encrypt and decrypt text using a symmetric algorithm.

Author:
Dmitri Melnikov

Method Summary
 String decrypt(String ciphertext)
          Decrypts the cipher text and returns the result.
 String encrypt(String plaintext)
          Encrypts the plain text and returns the result.
 

Method Detail

decrypt

String decrypt(String ciphertext)
               throws CryptoException
Decrypts the cipher text and returns the result.

Parameters:
ciphertext - base64 encoded encrypted data
Returns:
decrypted data
Throws:
CryptoException - when the ciphertext cannot be decrypted with the key or on decryption error.

encrypt

String encrypt(String plaintext)
               throws CryptoException
Encrypts the plain text and returns the result.

Parameters:
plaintext - data to be encrypted
Returns:
base64 encoded encrypted data
Throws:
CryptoException - on encryption error

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.