public static function fromPlain($aPlainPassword, UserPasswordEncoder $anEncoder, $salt = null)
    {
        if (null === $salt) {
            $salt = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);
        }
        $encodedPassword = $anEncoder->encode($aPlainPassword, $salt);

        return new self($encodedPassword, $salt);
    }