Returns {@code true} if the {@code submittedPlaintext} password matches the existing {@code saved} password,
{@code false} otherwise.
<h3>Usage</h3>
The {@code submittedPlaintext} argument type can be any 'byte backed' {@code Object} - almost always either a
string or character array representing passwords (character arrays are often a safer way to represent passwords
as they can be cleared/nulled-out after use. Any argument type supported by
{@link ByteSourceUtil#isCompatible(Object)} is valid.
<p/>
For example:
<pre>
string submittedPassword = ...
passwordService.passwordsMatch(submittedPassword, encryptedPassword);
</pre>
or similarly:
<pre>
char[] submittedPasswordCharacters = ...
passwordService.passwordsMatch(submittedPasswordCharacters, encryptedPassword);
</pre>
@param submittedPlaintext a raw/plaintext password submitted by an end user/Subject.
@param encrypted the previously encrypted password known to be associated with an account.
This value is expected to have been previously generated from the
{@link #encryptPassword(Object) encryptPassword} method (typically
when the account is created or the account's password is reset).
@return {@code true} if the {@code submittedPlaintext} password matches the existing {@code saved} password,
{@code false} otherwise.
@see ByteSourceUtil#isCompatible(Object)
Returns {@code true} if the {@code submittedPlaintext} password matches the existing {@code saved} password, {@code false} otherwise. <h3>Usage</h3> The {@code submittedPlaintext} argument type can be any 'byte backed' {@code Object} - almost always either a string or character array representing passwords (character arrays are often a safer way to represent passwords as they can be cleared/nulled-out after use. Any argument type supported by {@link ByteSourceUtil#isCompatible(Object)} is valid. <p/> For example: <pre> string submittedPassword = ... passwordService.passwordsMatch(submittedPassword, encryptedPassword); </pre> or similarly: <pre> char[] submittedPasswordCharacters = ... passwordService.passwordsMatch(submittedPasswordCharacters, encryptedPassword); </pre>
@param submittedPlaintext a raw/plaintext password submitted by an end user/Subject. @param encrypted the previously encrypted password known to be associated with an account. This value is expected to have been previously generated from the {@link #encryptPassword(Object) encryptPassword} method (typically when the account is created or the account's password is reset). @return {@code true} if the {@code submittedPlaintext} password matches the existing {@code saved} password, {@code false} otherwise. @see ByteSourceUtil#isCompatible(Object)