1 package org.apache.turbine.services.crypto.provider;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.apache.turbine.services.crypto.CryptoAlgorithm;
20
21 /***
22 * This is a dummy for "cleartext" encryption. It goes through
23 * the notions of the CryptoAlgorithm interface but actually does
24 * nothing. It can be used as a replacement for the "encrypt = no"
25 * setting in the TR.props.
26 *
27 * Can be used as the default crypto algorithm
28 *
29 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
30 * @version $Id: ClearCrypt.java 264148 2005-08-29 14:21:04Z henning $
31 */
32 public class ClearCrypt
33 implements CryptoAlgorithm
34 {
35 /***
36 * C'tor
37 */
38 public ClearCrypt()
39 {
40 }
41
42 /***
43 * This class never uses an algorithm, so this is
44 * just a dummy.
45 *
46 * @param cipher Cipher (ignored)
47 */
48 public void setCipher(String cipher)
49 {
50
51 }
52
53 /***
54 * This class never uses a seed, so this is
55 * just a dummy.
56 *
57 * @param seed Seed (ignored)
58 */
59 public void setSeed(String seed)
60 {
61
62 }
63
64 /***
65 * encrypt the supplied string with the requested cipher
66 *
67 * @param value The value to be encrypted
68 * @return The encrypted value
69 * @throws Exception An Exception of the underlying implementation.
70 */
71 public String encrypt(String value)
72 throws Exception
73 {
74
75
76
77
78 return value;
79 }
80
81 }