|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmail.node.crypt.CryptEngine
public abstract class CryptEngine
Constructor Summary | |
---|---|
CryptEngine()
|
Method Summary | |
---|---|
abstract boolean |
checkSignature(org.w3c.dom.Element signature)
decodes the signature with the public key and then checks it |
abstract void |
decrypt(org.w3c.dom.Element data)
decrypt data with the private key The document that contains the Element will be modified! |
abstract void |
encrypt(org.w3c.dom.Element data)
encrypt data with the public key The document that contains the Element will be modified! |
static byte[] |
fromHex(java.lang.String s)
|
private static int |
fromHexChar(char c)
|
ID |
getID()
computes the ID of the user with the public Key returned by getPublicKey() |
static ID |
getID(byte[] key)
computes an ID out of an Public key. |
abstract byte[] |
getPublicKey()
|
abstract java.lang.String |
getPublicKeyString()
|
abstract void |
sign(org.w3c.dom.Element data)
sign data with the private key The document that contains the Element will be modified! |
static java.lang.String |
toHex(byte[] arr)
|
private static char |
toHexChar(int b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CryptEngine()
Method Detail |
---|
public abstract void encrypt(org.w3c.dom.Element data) throws EncryptionException
data
- to be encrypted
EncryptionException
public abstract void sign(org.w3c.dom.Element data) throws EncryptionException
data
- to be signed
EncryptionException
public abstract boolean checkSignature(org.w3c.dom.Element signature) throws EncryptionException
signature
- to check
EncryptionException
public abstract void decrypt(org.w3c.dom.Element data) throws EncryptionException
data
- to be decrypted
EncryptionException
public abstract byte[] getPublicKey()
public abstract java.lang.String getPublicKeyString()
public ID getID()
getPublicKey()
#getID(PublicKey)
public static final ID getID(byte[] key)
k
- the public Key to compute the ID of
private static char toHexChar(int b)
private static int fromHexChar(char c)
public static java.lang.String toHex(byte[] arr)
public static byte[] fromHex(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |