/** * Hashes salted password. * * @param username * not null * @param password * not null * @return not null */ public static String hashPassword(String username, String password) { // Combine dynamic and static salt final String hashedSaltedPassword = Text.md5(Text.md5(username + password) + SALT); return hashedSaltedPassword; }
/** * Calculate an MD5 hash of the string given using 'utf-8' encoding. * * @param data the data to encode * @return a hex encoded string of the md5 digested input */ public static String md5(String data) { try { return md5(data, "utf-8"); } catch (UnsupportedEncodingException e) { throw new InternalError("UTF8 digest not available???"); } }
/** * Calculate an MD5 hash of the string given using 'utf-8' encoding. * * @param data the data to encode * @return a hex encoded string of the md5 digested input */ public static String md5(String data) { try { return md5(data, "utf-8"); } catch (UnsupportedEncodingException e) { throw new InternalError("UTF8 digest not available???"); } }
/** * Calculate an MD5 hash of the string given using 'utf-8' encoding. * * @param data the data to encode * @return a hex encoded string of the md5 digested input */ public static String md5(String data) { try { return md5(data, "utf-8"); } catch (UnsupportedEncodingException e) { throw new InternalError("UTF8 digest not available???"); } }
/** * Calculate an MD5 hash of the string given using 'utf-8' encoding. * * @param data the data to encode * @return a hex encoded string of the md5 digested input */ public static String md5(String data) { try { return md5(data, "utf-8"); } catch (UnsupportedEncodingException e) { throw new InternalError("UTF8 digest not available???"); } }
/** * Calculate an MD5 hash of the string given using 'utf-8' encoding. * * @param data the data to encode * @return a hex encoded string of the md5 digested input */ public static String md5(String data) { try { return md5(data, "utf-8"); } catch (UnsupportedEncodingException e) { throw new InternalError("UTF8 digest not available???"); } }
public WorkspaceContentHandler(Workspace workspace, String parentAbsPath, int uuidBehavior) throws RepositoryException { this.workspace = workspace; this.parentAbsPath = parentAbsPath; this.uuidBehavior = uuidBehavior; try { String tmpName = Text.md5(parentAbsPath); this.tmpFile = File.createTempFile("___" + tmpName, ".xml"); this.delegatee = SerializingContentHandler.getSerializer( new FileOutputStream(tmpFile)); } catch (FileNotFoundException e) { throw new RepositoryException(e); } catch (IOException e) { throw new RepositoryException(e); } catch (SAXException e) { throw new RepositoryException(e); } }
public WorkspaceContentHandler(Workspace workspace, String parentAbsPath, int uuidBehavior) throws RepositoryException { this.workspace = workspace; this.parentAbsPath = parentAbsPath; this.uuidBehavior = uuidBehavior; try { String tmpName = Text.md5(parentAbsPath); this.tmpFile = File.createTempFile("___" + tmpName, ".xml"); this.delegatee = SerializingContentHandler.getSerializer( new FileOutputStream(tmpFile)); } catch (FileNotFoundException e) { throw new RepositoryException(e); } catch (IOException e) { throw new RepositoryException(e); } catch (SAXException e) { throw new RepositoryException(e); } }