01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.wicket.util.crypt;
18:
19: /**
20: * Due to legal reasons in some countries the JRE is shipped without a security
21: * provider. As a convenience solution, we provide a default implementation
22: * which does not encrypt/decrypt the data. It does not modify the data at all.
23: * Thus we strongly recommend not to use it for production sites.
24: *
25: * @author Juergen Donnerstag
26: */
27: public class NoCrypt implements ICrypt {
28: /**
29: * Constructor
30: */
31: public NoCrypt() {
32: }
33:
34: /**
35: * Decrypts a string into a string.
36: *
37: * @param text
38: * text to decript
39: * @return the decrypted text
40: */
41: public final String decryptUrlSafe(final String text) {
42: return text;
43: }
44:
45: /**
46: * Encrypt a string into a string
47: *
48: * @param plainText
49: * text to encrypt
50: * @return encrypted string
51: */
52: public final String encryptUrlSafe(final String plainText) {
53: return plainText;
54: }
55:
56: /**
57: * Set encryption private key
58: *
59: * @param key
60: * private key to make de-/encryption unique
61: */
62: public void setKey(final String key) {
63: }
64: }
|