From 794466d463ceabe2576c051c18e6b736892e577f Mon Sep 17 00:00:00 2001 From: jeb228 Date: Mon, 9 Aug 2010 13:33:14 +0000 Subject: [PATCH] NIHVIVO-762 make applyMd5Encoding() a public static method so it can be used by UserRetryController, when resetting a user's password. --- .../vitro/webapp/controller/edit/Authenticate.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/Authenticate.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/Authenticate.java index 021e82cd8..5468d51a5 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/Authenticate.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/Authenticate.java @@ -536,11 +536,15 @@ public class Authenticate extends FreemarkerHttpServlet { return bean; } + // ---------------------------------------------------------------------- + // Public utility methods. + // ---------------------------------------------------------------------- + /** * Encode this password for storage in the database. Apply an MD5 encoding, * and store the result as a string of hex digits. */ - private String applyMd5Encoding(String password) { + public static String applyMd5Encoding(String password) { try { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] digest = md.digest(password.getBytes()); @@ -551,11 +555,7 @@ public class Authenticate extends FreemarkerHttpServlet { throw new RuntimeException(e); } } - - // ---------------------------------------------------------------------- - // Public utility methods. - // ---------------------------------------------------------------------- - + /** * The servlet context should contain a map from User URIs to * {@link HttpSession}s. Get a reference to it, creating it if necessary.