001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.wicket.util.crypt;
018
019
020/**
021 * Due to legal reasons in some countries the JRE is shipped without a security provider. As a
022 * convenience solution, we provide a default implementation which does not encrypt/decrypt the
023 * data. It does not modify the data at all. Thus we strongly recommend not to use it for production
024 * sites.
025 * 
026 * @author Juergen Donnerstag
027 */
028public class NoCrypt implements ICrypt
029{
030        /**
031         * Constructor
032         */
033        public NoCrypt()
034        {
035        }
036
037        /**
038         * Decrypts a string into a string.
039         * 
040         * @param text
041         *            text to decrypt
042         * @return the decrypted text
043         */
044        @Override
045        public final String decryptUrlSafe(final String text)
046        {
047                return text;
048        }
049
050        /**
051         * Encrypt a string into a string
052         * 
053         * @param plainText
054         *            text to encrypt
055         * @return encrypted string
056         */
057        @Override
058        public final String encryptUrlSafe(final String plainText)
059        {
060                return plainText;
061        }
062
063        /**
064         * Set encryption private key
065         * 
066         * @param key
067         *            private key to make de-/encryption unique
068         */
069        @Override
070        public void setKey(final String key)
071        {
072        }
073}