org.neociclo.odetteftp.protocol.v20
Enum CipherSuite

java.lang.Object
  extended by java.lang.Enum<CipherSuite>
      extended by org.neociclo.odetteftp.protocol.v20.CipherSuite
All Implemented Interfaces:
Serializable, Comparable<CipherSuite>

public enum CipherSuite
extends Enum<CipherSuite>

Enumeration indicating the cipher suite used to signe and/or encrypt the file and also to indicate the cipher suite that should be used when a signed EERP or NERP is requested.

    Value: '00'  No security services
                 Symmetric          Asymmetric    Hashing
                 -----------------  ------------  -------
           '01'  3DES_EDE_CBC_3KEY  RSA_PKCS1_15  SHA-1
           '02'  AES_256_CBC        RSA_PKCS1_15  SHA-1
 
TripleDES is using Cipher Block Chaining (CBC) mode for added security and uses the Encryption Decryption Encryption (EDE) process with 3 different 64-bit keys.

RSA padding is as defined in [PKCS#1].

AES is using a 256-bit key in CBC mode.

Version:
$Rev: 122 $ $Date: 2009-07-22 08:20:41 -0300 (Wed, 22 Jul 2009) $
Author:
Rafael Marins

Enum Constant Summary
AES_RSA_SHA1
           
NO_CIPHER_SUITE_SELECTION
           
TRIPLEDES_RSA_SHA1
           
 
Method Summary
 int getCode()
          Return the protocol representation of enum.
static CipherSuite parse(int code)
          Convenient method for parsing the proper CipherSuite enum given a protocol code.
static CipherSuite valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CipherSuite[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NO_CIPHER_SUITE_SELECTION

public static final CipherSuite NO_CIPHER_SUITE_SELECTION

TRIPLEDES_RSA_SHA1

public static final CipherSuite TRIPLEDES_RSA_SHA1

AES_RSA_SHA1

public static final CipherSuite AES_RSA_SHA1
Method Detail

values

public static CipherSuite[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CipherSuite c : CipherSuite.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CipherSuite valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

parse

public static CipherSuite parse(int code)
                         throws OdetteFtpException
Convenient method for parsing the proper CipherSuite enum given a protocol code.

Parameters:
code - The cipher suite selection being evaluated
Returns:
CipherSuite enum that correspond to the given code.
Throws:
OdetteFtpException
CommandNotRecognisedException - Code not recognized

getCode

public int getCode()
Return the protocol representation of enum.

Returns:
int corresponding protocol code.


ACCORD