Changeset 14366 for greenstone3/trunk/src/java/org/greenstone/gsdl3/util
- Timestamp:
- 2007-08-14T12:36:54+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/src/java/org/greenstone/gsdl3/util/DerbyWrapper.java
r14348 r14366 234 234 String returned_groups=rs.getString("groups"); 235 235 System.out.println("<groups>" + returned_groups); 236 String returned_password=r s.getString("password");236 String returned_password=rot13(rs.getString("password")); 237 237 System.out.println("<password>" + returned_password); 238 238 System.out.println("<username>" + returned_username); … … 252 252 } 253 253 } 254 255 //Simply use rot-13 to encrypt and decrypt the password 256 public String rot13(String password){ 257 String out_password=""; 258 for (int i = 0; i < password.length(); i++) { 259 char c = password.charAt(i); 260 if (c >= 'a' && c <= 'm') c += 13; 261 else if (c >= 'n' && c <= 'z') c -= 13; 262 else if (c >= 'A' && c <= 'M') c += 13; 263 else if (c >= 'A' && c <= 'Z') c -= 13; 264 out_password+=c; 265 } 266 return out_password; 267 } 254 268 }
Note:
See TracChangeset
for help on using the changeset viewer.