Cryptix OpenPGP

cryptix.message.stream
Class DecryptionKeyReturnValue

java.lang.Object
  extended bycryptix.message.stream.DecryptionKeyReturnValue

public class DecryptionKeyReturnValue
extends java.lang.Object

Return value for the decryption key callback function

Version:
$Revision: 1.1 $
Author:
Edwin Woudt

Field Summary
static int FAIL
          Fail the complete operation, i.e. throw an exception
static int NOERROR
          No error
 
Constructor Summary
DecryptionKeyReturnValue(char[] passphrase)
          Construct a DecryptionKeyReturnValue with the given passphrase.
DecryptionKeyReturnValue(int error)
          Construct a DecryptionKeyReturnValue with the given error.
DecryptionKeyReturnValue(KeyBundle bundle, char[] passphrase)
          Construct a DecryptionKeyReturnValue with the given keybundle and passphrase.
DecryptionKeyReturnValue(java.security.PrivateKey privkey)
          Construct a DecryptionKeyReturnValue with the given asymmetric private key.
DecryptionKeyReturnValue(javax.crypto.SecretKey seckey)
          Construct a DecryptionKeyReturnValue with the given symmetric secret key.
 
Method Summary
 KeyBundle getBundle()
          Return the key bundle.
 int getError()
          Return the error value.
 char[] getPassphrase()
          Return the passphrase.
 java.security.PrivateKey getPrivateKey()
          Return the symmetric secret key.
 javax.crypto.SecretKey getSecretKey()
          Return the symmetric secret key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOERROR

public static final int NOERROR
No error

See Also:
Constant Field Values

FAIL

public static final int FAIL
Fail the complete operation, i.e. throw an exception

See Also:
Constant Field Values
Constructor Detail

DecryptionKeyReturnValue

public DecryptionKeyReturnValue(int error)
Construct a DecryptionKeyReturnValue with the given error. For NOERROR, use one of the other constructors


DecryptionKeyReturnValue

public DecryptionKeyReturnValue(javax.crypto.SecretKey seckey)
Construct a DecryptionKeyReturnValue with the given symmetric secret key.


DecryptionKeyReturnValue

public DecryptionKeyReturnValue(java.security.PrivateKey privkey)
Construct a DecryptionKeyReturnValue with the given asymmetric private key.


DecryptionKeyReturnValue

public DecryptionKeyReturnValue(KeyBundle bundle,
                                char[] passphrase)
Construct a DecryptionKeyReturnValue with the given keybundle and passphrase.


DecryptionKeyReturnValue

public DecryptionKeyReturnValue(char[] passphrase)
Construct a DecryptionKeyReturnValue with the given passphrase. Used for passphrase based encryption.

Method Detail

getError

public int getError()
Return the error value. This is one of NOERROR or FAIL.


getSecretKey

public javax.crypto.SecretKey getSecretKey()
Return the symmetric secret key. Returns null if there is an error or when there is a different decryption key


getPrivateKey

public java.security.PrivateKey getPrivateKey()
Return the symmetric secret key. Returns null if there is an error or when there is a different decryption key


getBundle

public KeyBundle getBundle()
Return the key bundle. Returns null if there is an error or when there is a different decryption key


getPassphrase

public char[] getPassphrase()
Return the passphrase. The passphrase is only used when this object contains a KeyBundle or for passphrase based encryption. It will return null otherwise.


Cryptix OpenPGP

Copyright (C) 1999-2003 The Cryptix Foundation Ltd.