You are currently viewing a snapshot of taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to, please file a bug.

Class Decryptor

  extended by org.mozilla.jss.SecretDecoderRing.Decryptor

public class Decryptor
extends java.lang.Object

Decrypts data with the SecretDecoderRing.

Constructor Summary
Decryptor(CryptoToken token)
          Creates a Decryptor for use with the given CryptoToken.
Method Summary
 byte[] decrypt(byte[] ciphertext)
          Decrypts the given ciphertext.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Decryptor(CryptoToken token)
Creates a Decryptor for use with the given CryptoToken.

Method Detail


public byte[] decrypt(byte[] ciphertext)
               throws CryptoManager.NotInitializedException,
Decrypts the given ciphertext. It must have been created previously with the SecretDecoderRing, either the JSS version or the NSS version. The key used for decryption must exist on the token that was passed into the constructor. The token will be searched for a key whose keyID matches the keyID in the encoded SecretDecoderRing result.

ciphertext - A DER-encoded Encoding object, created from a previous call to Encryptor.encrypt(), or with the NSS SecretDecoderRing.
The decrypted plaintext.
Throws: - If no key can be found with the matching keyID.