String
The resulting array is guaranteed to always contain two elements. The first is the password, and the second is the salt.
Throws an exception if null or an empty String is passed to the method.
null
59606162636465666768
public void testMergeDemerge() { PlaintextPasswordEncoder pwd = new PlaintextPasswordEncoder(); String merged = pwd.encodePassword("password", "foo"); String[] demerged = pwd.obtainPasswordAndSalt(merged); assertEquals("password", demerged[0]); assertEquals("foo", demerged[1]); } }