1 package cn.home1.oss.lib.common.crypto;
2
3 /**
4 * A encryptor encrypt and encode the plain text.
5 * Created by zhanghaolun on 16/11/17.
6 */
7 public interface EncodeEncryptor {
8
9 /**
10 * encrypt and encode.
11 *
12 * @param plainText plain text to encrypt
13 * @return encrypted and encoded
14 */
15 String encrypt(String plainText);
16
17 /**
18 * encrypt and encode.
19 *
20 * @param plainText plainText plain text to encrypt
21 * @param maxAge maxAge in seconds
22 * @return encrypted and encoded
23 */
24 String encrypt(String plainText, Integer maxAge);
25 }