The exception NoSuchProviderException
is thrown by EncryptionManager
when it cannot find the provider specified in getEncryptionUtils
. The providers are loaded statically in EncryptionManager
class by retrieving them from the file META-INF/javamail-crypto.providers
. So, in order for EncryptionManager
to load PGP provider you will have to add a javamail-crypto.providers
file into your META-INF
folder with the following line:
protocol=PGP;class=net.suberic.crypto.PGPEncryptionUtils