Back to project page PasswordDroid.
The source code is released under:
GNU General Public License
If you think the Android project PasswordDroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.wuthoehle.passworddroid.crypto.SCryptParameters; /*from w w w .ja v a 2 s. c o m*/ /* Copyright (c) 2015 Marco Huenseler <marcoh.huenseler+git@gmail.com> * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ public class SCryptParametersFactory { public static final int SCRYPT_TEMPLATE_STRONG = 0; public static SCryptParameters getSCryptParameters(int template) { switch (template) { case SCRYPT_TEMPLATE_STRONG: default: return new SCryptParameters() { @Override public int getN() { return 131072; } @Override public int getR() { return 8; } @Override public int getP() { return 1; } @Override public int getLen() { return 40; } }; } } public static SCryptParameters getSCryptParameters(final int N, final int r, final int p, final int len) { return new SCryptParameters() { @Override public int getN() { return N; } @Override public int getR() { return r; } @Override public int getP() { return p; } @Override public int getLen() { return len; } }; } }