public class RsaEncryptor extends Object implements EncodeEncryptor
Constructor and Description |
---|
RsaEncryptor(Provider provider,
KeyExpression keyExpression) |
Modifier and Type | Method and Description |
---|---|
String |
encrypt(String plaintext)
encrypt and encode.
|
String |
encrypt(String plainText,
Integer maxAge)
encrypt and encode.
|
static String |
encryptAndEncode(Provider provider,
PublicKey publicKey,
String plaintext) |
static byte[] |
encryptBytes(Provider provider,
PublicKey publicKey,
byte[] binary) |
public RsaEncryptor(Provider provider, KeyExpression keyExpression)
public String encrypt(String plaintext)
EncodeEncryptor
encrypt
in interface EncodeEncryptor
plaintext
- plain text to encryptpublic String encrypt(String plainText, Integer maxAge)
EncodeEncryptor
encrypt
in interface EncodeEncryptor
plainText
- plainText plain text to encryptmaxAge
- maxAge in secondspublic static byte[] encryptBytes(Provider provider, PublicKey publicKey, byte[] binary)
Copyright © 2017. All rights reserved.