| | |
| | | package org.opends.server.extensions; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.opendj.ldap.Base64; |
| | | import org.forgerock.opendj.server.config.server.BlowfishPasswordStorageSchemeCfg; |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.forgerock.opendj.config.server.ConfigException; |
| | |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | ByteString decryptedPassword = |
| | | ByteString.wrap(cryptoManager.decrypt( |
| | | Base64.decode(storedPassword.toString()))); |
| | | return plaintextPassword.equals(decryptedPassword); |
| | | return plaintextPassword.equals(ByteString.wrap( |
| | | cryptoManager.decrypt(Base64.decode(storedPassword.toString()).toByteArray()))); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | try |
| | | { |
| | | byte[] decryptedPassword = |
| | | cryptoManager.decrypt(Base64.decode(storedPassword.toString())); |
| | | cryptoManager.decrypt(Base64.decode(storedPassword.toString()).toByteArray()); |
| | | return ByteString.wrap(decryptedPassword); |
| | | } |
| | | catch (Exception e) |