net.suberic.crypto
Class EncryptionManager
java.lang.Object
net.suberic.crypto.EncryptionManager
- public class EncryptionManager
- extends java.lang.Object
Manager for the JavaMail Encryption package.
Field Summary |
static java.lang.String |
PGP
|
static java.lang.String |
SMIME
|
Method Summary |
static java.lang.String |
checkEncryptionType(javax.mail.internet.MimePart mp)
Identifies the encryption type of the given MimePart. |
static EncryptionUtils |
getEncryptionUtils(javax.mail.internet.MimePart mp)
Returns an EncryptionUtils object for the given MimePart. |
static EncryptionUtils |
getEncryptionUtils(java.lang.String type)
Returns an EncryptionUtils for the given encryption method, usually
'S/MIME' or 'PGP'. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SMIME
public static java.lang.String SMIME
PGP
public static java.lang.String PGP
EncryptionManager
public EncryptionManager()
getEncryptionUtils
public static EncryptionUtils getEncryptionUtils(java.lang.String type)
throws java.security.NoSuchProviderException
- Returns an EncryptionUtils for the given encryption method, usually
'S/MIME' or 'PGP'.
- Throws:
java.security.NoSuchProviderException
getEncryptionUtils
public static EncryptionUtils getEncryptionUtils(javax.mail.internet.MimePart mp)
throws javax.mail.MessagingException,
java.security.NoSuchProviderException
- Returns an EncryptionUtils object for the given MimePart. Returns null
if the part is not a recognized encrypted part.
- Throws:
javax.mail.MessagingException
java.security.NoSuchProviderException
checkEncryptionType
public static java.lang.String checkEncryptionType(javax.mail.internet.MimePart mp)
throws javax.mail.MessagingException
- Identifies the encryption type of the given MimePart. Returns
null if no encryption, or the encryption string if the message is
encrypted or signed.
- Throws:
javax.mail.MessagingException