/* * Copyright LGPL3 * YES Technology Association * http://yestech.org * * http://www.opensource.org/licenses/lgpl-3.0.html */ /* * * Author: Artie Copeland * Last Modified Date: $DateTime: $ */ package org.yestech.lib.crypto; import java.io.Serializable; /** * @author Artie Copeland * @version $Revision: $ */ public interface ICryptoConstants extends Serializable { static public final String SALTCHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; static public final String ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; /** * Minimum length for a decent password */ public static final int MIN_LENGTH = 10; /** * Holds a cache of all lower letter */ final public static char[] LOWER_ALPHABET = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; /** * Holds a cache of all upper letter */ final public static char[] UPPER_ALPHABET = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}; /* Set of characters that is valid. Must be printable, memorable, * and "won't break HTML" (i.e., not '<', '>', '&', '=', ...). * or break shell commands (i.e., not '<', '>', '$', '!', ...). * I, L and O are good to leave out, as are numeric zero and one. */ final public static char[] UPPER_AND_LOWER_WITH_PLUS_MINUS_AT = { // Comment out next two lines to make upper-case-only, then // use String toUpper() on the user's input before validating. 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', '8', '9', '+', '-', '@', }; }