Package no.digipost.api.client.security
Class Encrypter
- java.lang.Object
-
- no.digipost.api.client.security.Encrypter
-
public final class Encrypter extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static EncrypterFAIL_IF_TRYING_TO_ENCRYPTEncrypter with no key, i.e.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamencrypt(byte[] content)InputStreamencrypt(InputStream content)static Encrypterusing(X509Certificate certificate)static Encrypterusing(DigipostPublicKey key)
-
-
-
Field Detail
-
FAIL_IF_TRYING_TO_ENCRYPT
public static final Encrypter FAIL_IF_TRYING_TO_ENCRYPT
Encrypter with no key, i.e. it will throw an appropriate exception if trying to encrypt anything with it.
-
-
Method Detail
-
using
public static Encrypter using(DigipostPublicKey key)
-
using
public static Encrypter using(X509Certificate certificate)
-
encrypt
public InputStream encrypt(InputStream content)
-
encrypt
public InputStream encrypt(byte[] content)
-
-