public abstract class Encryption<EKEY extends Key,DKEY extends Key> extends Object implements Serializable, Comparable<Encryption<EKEY,DKEY>>
Modifier | Constructor and Description |
---|---|
protected |
Encryption(XdiAttribute xdiAttribute) |
Modifier and Type | Method and Description |
---|---|
void |
clearAfterDecrypt() |
void |
clearAfterEncrypt() |
int |
compareTo(Encryption<EKEY,DKEY> other) |
abstract void |
decrypt(DKEY key)
Decrypt the encryption value.
|
abstract void |
encrypt(EKEY key)
Create the encryption value.
|
boolean |
equals(Object object) |
static Encryption<? extends Key,? extends Key> |
fromXdiAttribute(XdiAttribute xdiAttribute)
Factory method that creates an XDI encryption bound to a given XDI attribute.
|
ContextNode |
getBaseContextNode() |
ContextNode |
getContextNode()
Returns the underlying context node to which this XDI encryption is bound.
|
String |
getKeyAlgorithm() |
Integer |
getKeyLength() |
abstract String |
getTransformation() |
String |
getValue()
Get the value
|
XdiAttribute |
getXdiAttribute()
Returns the underlying XDI attribute to which this XDI encryption is bound.
|
int |
hashCode() |
static boolean |
isValid(XdiAttribute xdiAttribute)
Checks if an XDI attribute is a valid XDI encryption.
|
void |
setValue(String value)
Set the value
|
String |
toString() |
protected Encryption(XdiAttribute xdiAttribute)
public static boolean isValid(XdiAttribute xdiAttribute)
xdiAttribute
- The XDI attribute to check.public static Encryption<? extends Key,? extends Key> fromXdiAttribute(XdiAttribute xdiAttribute)
xdiAttribute
- The XDI encryption that is an XDI encryption.public void clearAfterEncrypt()
public void clearAfterDecrypt()
public XdiAttribute getXdiAttribute()
public ContextNode getContextNode()
public ContextNode getBaseContextNode()
public String getKeyAlgorithm()
public Integer getKeyLength()
public abstract String getTransformation()
public String getValue()
public void setValue(String value)
public abstract void encrypt(EKEY key) throws GeneralSecurityException
GeneralSecurityException
public abstract void decrypt(DKEY key) throws GeneralSecurityException
GeneralSecurityException
public int compareTo(Encryption<EKEY,DKEY> other)
compareTo
in interface Comparable<Encryption<EKEY extends Key,DKEY extends Key>>
Copyright © 2017. All rights reserved.