com.atlassian.confluence.security.persistence.dao.hibernate
Class KeyTransferBean

java.lang.Object
  extended by com.atlassian.confluence.security.persistence.dao.hibernate.KeyTransferBean
All Implemented Interfaces:
Serializable

public class KeyTransferBean
extends Object
implements Serializable

Allows conversion to and from serialized form.

See Also:
Serialized Form

Field Summary
static String TYPE_PRIVATE
           
static String TYPE_PUBLIC
           
 
Constructor Summary
KeyTransferBean(Key key)
           
KeyTransferBean(String asCData)
          This is really messy.
KeyTransferBean(String type, String algorithm, String encodedKey)
           
 
Method Summary
 String asCDataEncodedString()
          Yuck this makes me sick.
 Key asKey()
           
static String CDatafyString(String s)
           
 String encodeKey(Key key)
          Encode a Key in string form for storage as a database CLOB field
 String getAlgorithm()
           
 String getEncodedKey()
           
protected  com.atlassian.security.auth.trustedapps.EncryptionProvider getEncryptionProvider()
           
 String getKeyType()
           
 void setAlgorithm(String algorithm)
           
 void setEncodedKey(String encodedKey)
           
 void setKeyType(String keyType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_PRIVATE

public static final String TYPE_PRIVATE
See Also:
Constant Field Values

TYPE_PUBLIC

public static final String TYPE_PUBLIC
See Also:
Constant Field Values
Constructor Detail

KeyTransferBean

public KeyTransferBean(String asCData)
This is really messy. This works assuming that there are not any spaces in the fields.


KeyTransferBean

public KeyTransferBean(String type,
                       String algorithm,
                       String encodedKey)
Parameters:
encodedKey - the encoded key
type - the key type
algorithm - String denoting the crypto algorithm used

KeyTransferBean

public KeyTransferBean(Key key)
Method Detail

getKeyType

public String getKeyType()

getAlgorithm

public String getAlgorithm()

getEncodedKey

public String getEncodedKey()

setKeyType

public void setKeyType(String keyType)

setEncodedKey

public void setEncodedKey(String encodedKey)

setAlgorithm

public void setAlgorithm(String algorithm)

asKey

public Key asKey()

getEncryptionProvider

protected com.atlassian.security.auth.trustedapps.EncryptionProvider getEncryptionProvider()

encodeKey

public String encodeKey(Key key)
Encode a Key in string form for storage as a database CLOB field

Parameters:
key - Opaque key
Returns:
String encoded form

asCDataEncodedString

public String asCDataEncodedString()
Yuck this makes me sick.


CDatafyString

public static String CDatafyString(String s)


Copyright © 2003-2011 Atlassian. All Rights Reserved.