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:
java.io.Serializable

public class KeyTransferBean
extends java.lang.Object
implements java.io.Serializable

Allows conversion to and from serialized form.

See Also:
Serialized Form

Field Summary
static java.lang.String TYPE_PRIVATE
           
static java.lang.String TYPE_PUBLIC
           
 
Constructor Summary
KeyTransferBean(java.security.Key key)
           
KeyTransferBean(java.lang.String asCData)
          This is really messy.
KeyTransferBean(java.lang.String type, java.lang.String algorithm, java.lang.String encodedKey)
           
 
Method Summary
 java.lang.String asCDataEncodedString()
          Yuck this makes me sick.
 java.security.Key asKey()
           
static java.lang.String CDatafyString(java.lang.String s)
           
 java.lang.String encodeKey(java.security.Key key)
          Encode a Key in string form for storage as a database CLOB field
 java.lang.String getAlgorithm()
           
 java.lang.String getEncodedKey()
           
protected  com.atlassian.security.auth.trustedapps.EncryptionProvider getEncryptionProvider()
           
 java.lang.String getKeyType()
           
 void setAlgorithm(java.lang.String algorithm)
           
 void setEncodedKey(java.lang.String encodedKey)
           
 void setKeyType(java.lang.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 java.lang.String TYPE_PRIVATE
See Also:
Constant Field Values

TYPE_PUBLIC

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

KeyTransferBean

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


KeyTransferBean

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

KeyTransferBean

public KeyTransferBean(java.security.Key key)
Method Detail

getKeyType

public java.lang.String getKeyType()

getAlgorithm

public java.lang.String getAlgorithm()

getEncodedKey

public java.lang.String getEncodedKey()

setKeyType

public void setKeyType(java.lang.String keyType)

setEncodedKey

public void setEncodedKey(java.lang.String encodedKey)

setAlgorithm

public void setAlgorithm(java.lang.String algorithm)

asKey

public java.security.Key asKey()

getEncryptionProvider

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

encodeKey

public java.lang.String encodeKey(java.security.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 java.lang.String asCDataEncodedString()
Yuck this makes me sick.


CDatafyString

public static java.lang.String CDatafyString(java.lang.String s)


Copyright © 2003-2014 Atlassian. All Rights Reserved.