@@ -0,0 +1,2620 @@
+package cologne.eck.peafactory.crypto.kdf;%0A%0A/*%0A * PeaFactory - Production of Password Encryption Archives%0A * Copyright (C) 2015  Axel von dem Bruch%0A * %0A * This library is free software; you can redistribute it and/or modify it %0A * under the terms of the GNU General Public License as published %0A * by the Free Software Foundation; either version 2 of the License, %0A * or (at your option) any later version.%0A * This library is distributed in the hope that it will be useful, but %0A * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY %0A * or FITNESS FOR A PARTICULAR PURPOSE. %0A * See the GNU General Public License for more details.%0A * See:  http://www.gnu.org/licenses/gpl-2.0.html%0A * You should have received a copy of the GNU General Public License %0A * along with this library.%0A */%0A%0A/**%0A * Interface for Password Hashing Schemes. %0A * This is based on the standard function of the Password Hashing Competition,%0A * but does not completely corresponds to the (C-style) prototype.%0A */%0A%0A%0Apublic interface PasswordHashingScheme %7B%0A%09%0A%09  static final int PASSWORD_HASHING = 0;// in Catena called: Password Scrambler%0A%09  %09// most used for Authentication%0A%09  static final int KEY_DERIVATION = 1;%0A%09  static final int PROOF_OF_WORK = 2; // Catena %0A%0A    /**%0A     * Return the name of the password hashing scheme%0A     *%0A     * @return %0A%09 * %09%09%09the name of the password hashing scheme%0A     */%0A    public String getAlgorithmName();%0A%0A    /**%0A     * Calculate the password hash. This can be used for key derivation,%0A     * authentication or any other purpose. If these modes differ, this %0A     * must be determined by the varArgs parameter. %0A     * %0A     * @param %09outlen%0A     * %09%09%09%09%09required length in byte for the password hash%0A     * @param %09in %0A%09 *%09%09%09%09%09the password to be hashed%0A     * @param %09salt%0A     * %09%09%09%09%09a salt value%0A     * @param %09t_cost %0A%09 *%09%09%09%09%09the time cost parameter%0A     * @param %09m_cost%0A     * %09%09%09%09%09the memory cost parameter%0A     * @param %09varArgs%0A     * %09%09%09%09%09additional parameters, not used by all schemes%0A     * %0A     * @return the password hash%0A     * %0A     * @throws Exception %0A     * %09%09%09%09%09%0A     */%0A    public byte%5B%5D hashPassword(int outlen, byte%5B%5D in, byte%5B%5D salt, int t_cost, int m_cost, Object ... varArgs) throws Exception; %0A%0A%0A%09/**%0A%09 * indicates if zeroization of password is performed or not%0A%09 * %0A%09 * @return the wipePassword value%0A%09 */%0A%09public boolean isWipePassword();%0A%0A%09/**%0A%09 * zeroize the password or keep it%0A%09 * %0A%09 * @param _wipe %0A%09 * %09%09%09%09%09true: wipe the password as soon as %0A%09 * %09%09%09%09%09possible %0A%09 * %09%09%09%09%09false: keep it for later use%0A%09 */%0A%09public void setWipePassword(boolean _wipe);%0A%7D%0A

Create PasswordHashingScheme.java