01: package org.enhydra.dm.api.util;
02:
03: import java.util.Properties;
04:
05: import org.enhydra.dm.api.exceptions.BaseException;
06: import org.enhydra.dm.api.loggers.Log;
07:
08: import com.lutris.util.Config;
09:
10: /**
11: * Interface with methods for encoding functionality.
12: *
13: * @author Slobodan Vujasinovic
14: */
15:
16: public interface DesEncription {
17:
18: /**
19: * @param str
20: * @param strEncoding
21: * @return
22: * @throws BaseException
23: */
24: public String encrypt(String str, String strEncoding)
25: throws BaseException;
26:
27: /**
28: * @param str
29: * @return
30: * @throws BaseException
31: */
32: public String encrypt(String str) throws BaseException;
33:
34: /**
35: * @param strEncrypted
36: * @param strEncoding
37: * @return
38: * @throws BaseException
39: */
40: public String decrypt(String strEncrypted, String strEncoding)
41: throws BaseException;
42:
43: /**
44: * @param strEncrypted
45: * @return
46: * @throws BaseException
47: */
48: public String decrypt(String strEncrypted) throws BaseException;
49:
50: /**
51: * Getter for logger
52: *
53: * @return
54: */
55: public Log getLogger();
56:
57: /**
58: * Setter for logger
59: *
60: * @param logger
61: */
62: public void setLogger(Log logger);
63:
64: /**
65: * Configure method that reads parameters from Config
66: *
67: * @param config
68: * @throws BaseException
69: */
70: public void configure(Config config) throws BaseException;
71:
72: /**
73: * Configure method that reads parameters from Properties
74: *
75: * @param properties
76: * @throws BaseException
77: */
78: public void configure(Properties properties) throws BaseException;
79:
80: }
|