init code
[vfc/nfvo/wfengine.git] / wso2 / common-util / src / main / java / org / openo / baseservice / encrypt / cbb / inf / AbstractCipher.java
1 /*
2  * Copyright 2016 Huawei Technologies Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.openo.baseservice.encrypt.cbb.inf;
17
18 /**
19  * Cipher Manager, provides the encrypt/decrypt interface
20  * <br/>
21  * <p>
22  * It provides bi-directional encryption api.
23  * </p>
24  * 
25  * @author
26  * @version   31-May-2016
27  */
28 public interface AbstractCipher {
29
30     /**
31      * Encrypt a string.
32      * <br/>
33      * 
34      * @param plain string to be encrypted.
35      * @return encrypted string.
36      * @since  
37      */
38     String encrypt(String plain);
39
40     /**
41      * Decrypt a string.
42      * <br/>
43      * 
44      * @param encrypted String is encrypted by AES 128
45      * @return plain after decrypt
46      * @since  
47      */
48     String decrypt(String encrypted);
49
50 }