Class BlowfishKey
- java.lang.Object
-
- org.silverpeas.core.security.encryption.cipher.BlowfishKey
-
- All Implemented Interfaces:
Serializable
,Key
public class BlowfishKey extends Object implements Key
A representation of a symmetric key used in the Blowfish cipher. It is a wrapper of the actual key it generates from a plain text representation of the key.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BlowfishKey()
Constructs a new symmetric key for the Blowfish cipher.BlowfishKey(byte[] keyCode)
Constructs a new symmetric key for the Blowfish cypher from the specified binary key code.BlowfishKey(String keyCode)
Constructs a new symmetric key for the Blowfish cypher from the specified key code in text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlgorithm()
byte[]
getEncoded()
String
getFormat()
-
-
-
Constructor Detail
-
BlowfishKey
public BlowfishKey()
Constructs a new symmetric key for the Blowfish cipher. The key is computed from a default code; that is to say two instances created by using this constructor are equal.
-
BlowfishKey
public BlowfishKey(String keyCode)
Constructs a new symmetric key for the Blowfish cypher from the specified key code in text.- Parameters:
keyCode
- the code of the key. Must be in UTF-8.
-
BlowfishKey
public BlowfishKey(byte[] keyCode)
Constructs a new symmetric key for the Blowfish cypher from the specified binary key code.- Parameters:
keyCode
- the code of the key.
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm
in interfaceKey
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncoded
in interfaceKey
-
-