Skip to content

Commit

Permalink
Return unicodePwd as byte[] instead of String
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed Feb 15, 2024
1 parent 906f630 commit 41f8711
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/lsc/utils/directory/AD.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ public static int userAccountControlToggle(int value, String constToApply) {
* @return The value to write in AD's unicodePwd attribute
* @throws UnsupportedEncodingException
*/
public static String getUnicodePwd(String password) throws UnsupportedEncodingException {
public static byte[] getUnicodePwd(String password) throws UnsupportedEncodingException {
String quotedPassword = "\"" + password + "\"";
return new String(quotedPassword.getBytes("UTF-16LE"));
return quotedPassword.getBytes("UTF-16LE");
}


Expand Down

0 comments on commit 41f8711

Please sign in to comment.