/** * Encode the given {@link Password} to a string. * * @param password the password to encode * @return a string representing the encoded password * @throws InvalidKeySpecException if the given password is not supported or could be encoded */ public static String encodeAsString(Password password) throws InvalidKeySpecException { return getCryptStringToBuilder(password).toString(); }
/** * Encode the given {@link Password} to a char array. * * @param password the password to encode * @return a char array representing the encoded password * @throws InvalidKeySpecException if the given password is not supported or could be encoded */ public static char[] encode(Password password) throws InvalidKeySpecException { StringBuilder b = getCryptStringToBuilder(password); char[] chars = new char[b.length()]; b.getChars(0, b.length(), chars, 0); return chars; }
/** * Encode the given {@link Password} to a string. * * @param password the password to encode * @return a string representing the encoded password * @throws InvalidKeySpecException if the given password is not supported or could be encoded */ public static String encodeAsString(Password password) throws InvalidKeySpecException { return getCryptStringToBuilder(password).toString(); }
/** * Encode the given {@link Password} to a string. * * @param password the password to encode * @return a string representing the encoded password * @throws InvalidKeySpecException if the given password is not supported or could be encoded */ public static String encodeAsString(Password password) throws InvalidKeySpecException { return getCryptStringToBuilder(password).toString(); }
/** * Encode the given {@link Password} to a string. * * @param password the password to encode * @return a string representing the encoded password * @throws InvalidKeySpecException if the given password is not supported or could be encoded */ public static String encodeAsString(Password password) throws InvalidKeySpecException { return getCryptStringToBuilder(password).toString(); }
/** * Encode the given {@link Password} to a char array. * * @param password the password to encode * @return a char array representing the encoded password * @throws InvalidKeySpecException if the given password is not supported or could be encoded */ public static char[] encode(Password password) throws InvalidKeySpecException { StringBuilder b = getCryptStringToBuilder(password); char[] chars = new char[b.length()]; b.getChars(0, b.length(), chars, 0); return chars; }
/** * Encode the given {@link Password} to a char array. * * @param password the password to encode * @return a char array representing the encoded password * @throws InvalidKeySpecException if the given password is not supported or could be encoded */ public static char[] encode(Password password) throws InvalidKeySpecException { StringBuilder b = getCryptStringToBuilder(password); char[] chars = new char[b.length()]; b.getChars(0, b.length(), chars, 0); return chars; }
/** * Encode the given {@link Password} to a char array. * * @param password the password to encode * @return a char array representing the encoded password * @throws InvalidKeySpecException if the given password is not supported or could be encoded */ public static char[] encode(Password password) throws InvalidKeySpecException { StringBuilder b = getCryptStringToBuilder(password); char[] chars = new char[b.length()]; b.getChars(0, b.length(), chars, 0); return chars; }