Java tutorial
/* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.xwiki.crypto.passwd.internal; import org.bouncycastle.crypto.engines.CAST5Engine; import org.bouncycastle.crypto.modes.CBCBlockCipher; import org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher; /** * A password ciphertext service implementing CAST5. * * @version $Id: 1535e87e79c810367a98576930176d49b13a96a7 $ * @since 2.5M1 */ public class CAST5PasswordCiphertext extends AbstractPasswordCiphertext { /** * Fields in this class are set in stone! * Any changes may result in encrypted data becoming unreadable. * This class should be extended if any changes need to be made. */ private static final long serialVersionUID = 1L; /** * {@inheritDoc} * * @see org.xwiki.crypto.passwd.internal.AbstractPasswordCiphertext#newCipherInstance() */ @Override protected PaddedBufferedBlockCipher newCipherInstance() { return new PaddedBufferedBlockCipher(new CBCBlockCipher(new CAST5Engine())); } }