# Max length error on custom hash password salt

**URL:** <https://community.auth0.com/t/max-length-error-on-custom-hash-password-salt/94282>\
**Category:** Get Help\
**Tags:** user-import-export, user-management\
**Created:** [November 11, 2022, 4:50pm UTC](https://community.auth0.com/t/max-length-error-on-custom-hash-password-salt/94282 "2022-11-11T16:50:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ncooper](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ncooper/32/41225_2.png) [@ncooper](https://community.auth0.com/u/ncooper)\
**Post date:** [November 11, 2022, 4:50pm UTC](https://community.auth0.com/t/max-length-error-on-custom-hash-password-salt/94282/1 "2022-11-11T16:50:07Z")

</div>

i’m attempting to import users from an existing database which contains hashed passwords and password salts.

```auto
[
    {
        "user": {
            "email": "ncooper-permstest@amplience.com",
            "name": "Neil Cooper",
            "email_verified": false,
            "custom_password_hash": {
                "algorithm": "md5",
                "hash": {
                    "value": " *****",
                    "encoding": "base64"
                },
                "salt": {
                    "value": " *****",
                    "encoding": "utf8",
                    "position": "prefix"
                }
            }
        },
        "errors": [
            {
                "code": "MAX_LENGTH",
                "message": "Error in custom_password_hash.salt.value property - String is too long (147 chars), maximum 128",
                "path": "custom_password_hash.salt.value"
            }
        ]
    }
]

```

i can’t find anything that sets the maximum salt length. is this configurable? or am i doing something wrong somewhere?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 14, 2022, 5:48pm UTC](https://community.auth0.com/t/max-length-error-on-custom-hash-password-salt/94282/3 "2022-11-14T17:48:43Z")

</div>

Hi @ncooper,

Welcome to the Auth0 Community!

From what I can find internally, the salt length is not configurable and we support salts up to 128 characters in length.

With that said, 147 characters seems quite long for a salt (and an odd number), is there a reason you have salts of that length? Could it be the salt value isn’t correct?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 30, 2023, 9:33pm UTC](https://community.auth0.com/t/max-length-error-on-custom-hash-password-salt/94282/5 "2023-01-30T21:33:59Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
