com.cafesoft.core.crypto
Class SecretKeyCipher.CipherSpec

java.lang.Object
  |
  +--com.cafesoft.core.crypto.SecretKeyCipher.CipherSpec
Enclosing class:
SecretKeyCipher

public static final class SecretKeyCipher.CipherSpec
extends Object

CipherSpec is a wrapper for metadata about a Cipher specification. This includes:


Constructor Summary
SecretKeyCipher.CipherSpec(String algorithm, String cipherSpec, int keySize)
          Create a new CipherSpec.
 
Method Summary
 String getAlgorithm()
          Get the cipher algorithm.
 String getCipherSpec()
          Get the cipher specification as a String.
 int getKeySize()
          Get the supported cipher key size.
 int hashCode()
          Override hashcode so that CipherSpec are hashed by algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecretKeyCipher.CipherSpec

public SecretKeyCipher.CipherSpec(String algorithm,
                                  String cipherSpec,
                                  int keySize)
Create a new CipherSpec.

Parameters:
algorithm - the name of the encryption/decryption algorithm
cipherSpec - The cipher specification
keySize - the supported key size
Method Detail

getAlgorithm

public String getAlgorithm()
Get the cipher algorithm.

Returns:
the cipher algorithm.

getCipherSpec

public String getCipherSpec()
Get the cipher specification as a String.

Returns:
the full cipher specification in format: algorithm/blocktype/paddingtype.

getKeySize

public int getKeySize()
Get the supported cipher key size.

Returns:
the supported cipher key size.

hashCode

public int hashCode()
Override hashcode so that CipherSpec are hashed by algorithm.

Overrides:
hashCode in class Object
Returns:
the hashcode for a CipherSpec.


Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.