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