|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmail.node.crypt.CryptEngine
mail.node.crypt.OtherCryptEngine
public class OtherCryptEngine
Field Summary | |
---|---|
(package private) ID |
id
|
(package private) java.security.PublicKey |
pubkey
|
Constructor Summary | |
---|---|
OtherCryptEngine(ID id)
|
|
OtherCryptEngine(java.lang.String publicKey)
Creates a CryptEngine that is initialised with a public key. |
Method Summary | |
---|---|
boolean |
checkSignature(org.w3c.dom.Element data)
decodes the signature with the public key and then checks it |
void |
decrypt(org.w3c.dom.Element data)
decrypt data with the private key The document that contains the Element will be modified! |
void |
encrypt(org.w3c.dom.Element data)
encrypt data with the public key The document that contains the Element will be modified! |
private static javax.crypto.SecretKey |
generateDataEncryptionKey()
Get a key to be used for encrypting the element. |
ID |
getID()
computes the ID of the user with the public Key returned by CryptEngine.getPublicKey() |
byte[] |
getPublicKey()
|
java.lang.String |
getPublicKeyString()
|
void |
sign(org.w3c.dom.Element data)
sign data with the private key The document that contains the Element will be modified! |
Methods inherited from class mail.node.crypt.CryptEngine |
---|
fromHex, getID, toHex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.security.PublicKey pubkey
ID id
Constructor Detail |
---|
public OtherCryptEngine(java.lang.String publicKey) throws CryptCreationException
ALGORITHM:FORMAT:HEXDATA
publicKey
-
CryptCreationException
public OtherCryptEngine(ID id)
Method Detail |
---|
public ID getID()
CryptEngine
CryptEngine.getPublicKey()
getID
in class CryptEngine
#getID(PublicKey)
public void decrypt(org.w3c.dom.Element data) throws EncryptionException
CryptEngine
decrypt
in class CryptEngine
data
- to be decrypted
EncryptionException
private static javax.crypto.SecretKey generateDataEncryptionKey() throws java.lang.Exception
java.lang.Exception
public void encrypt(org.w3c.dom.Element data) throws EncryptionException
CryptEngine
encrypt
in class CryptEngine
data
- to be encrypted
EncryptionException
public byte[] getPublicKey()
getPublicKey
in class CryptEngine
public java.lang.String getPublicKeyString()
getPublicKeyString
in class CryptEngine
public boolean checkSignature(org.w3c.dom.Element data) throws EncryptionException
CryptEngine
checkSignature
in class CryptEngine
data
- to check
EncryptionException
public void sign(org.w3c.dom.Element data) throws EncryptionException
CryptEngine
sign
in class CryptEngine
data
- to be signed
EncryptionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |