{
    "content": [
        {
            "type": "text",
            "text": "# CRYPT_CHECKSALT (man)\n\n## NAME\n\ncryptchecksalt — validate a crypt setting string\n\n## DESCRIPTION\n\ncryptchecksalt checks the setting string against the system configuration and reports whether\nthe hashing method and parameters it specifies are acceptable.  It is intended to be used by\nprograms such as login(1) to determine whether the user's passphrase should be re-hashed using\nthe currently preferred hashing method.\n\n## Sections\n\n- **NAME**\n- **LIBRARY**\n- **SYNOPSIS** (1 subsections)\n- **DESCRIPTION**\n- **RETURN VALUES**\n- **FEATURE TEST MACROS**\n- **BUGS**\n- **PORTABILITY NOTES**\n- **ATTRIBUTES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "CRYPT_CHECKSALT",
        "section": "",
        "mode": "man",
        "summary": "cryptchecksalt — validate a crypt setting string",
        "synopsis": "",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "crypt",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/crypt/3/json"
            },
            {
                "name": "cryptgensalt",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/cryptgensalt/3/json"
            },
            {
                "name": "crypt",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/crypt/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LIBRARY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "#include <crypt.h>",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "RETURN VALUES",
                "lines": 27,
                "subsections": []
            },
            {
                "name": "FEATURE TEST MACROS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "PORTABILITY NOTES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "ATTRIBUTES",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "cryptchecksalt — validate a crypt setting string\n",
                "subsections": []
            },
            "LIBRARY": {
                "content": "Crypt Library (libcrypt, -lcrypt)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "",
                "subsections": [
                    {
                        "name": "#include <crypt.h>",
                        "content": "int\ncryptchecksalt(const char *setting);\n"
                    }
                ]
            },
            "DESCRIPTION": {
                "content": "cryptchecksalt checks the setting string against the system configuration and reports whether\nthe hashing method and parameters it specifies are acceptable.  It is intended to be used by\nprograms such as login(1) to determine whether the user's passphrase should be re-hashed using\nthe currently preferred hashing method.\n",
                "subsections": []
            },
            "RETURN VALUES": {
                "content": "The return value is 0 if there is nothing wrong with this setting.  Otherwise, it is one of the\nfollowing constants:\n\nCRYPTSALTOK\nsetting is a fully correct setting string.  This constant is guaranteed to equal 0.\n\nCRYPTSALTINVALID\nsetting is not a valid setting string; either it specifies a hashing method that is not\nknown to this version of libxcrypt, or it specifies invalid parameters for the method.\n\nCRYPTSALTMETHODDISABLED (Not implemented, yet)\nsetting specifies a hashing method that is no longer allowed to be used at all; crypt\nwill fail if passed this setting.  Manual intervention will be required to reactivate the\nuser's account.\n\nCRYPTSALTMETHODLEGACY\nsetting specifies a hashing method that is no longer considered strong enough for use\nwith new passphrases.  crypt will still authenticate a passphrase against this setting,\nbut if authentication succeeds, the passphrase should be re-hashed using the currently\npreferred method.\n\nCRYPTSALTTOOCHEAP (Not implemented, yet)\nsetting specifies cost parameters that are considered too cheap for use with new\npassphrases.  crypt will still authenticate a passphrase against this setting, but if au‐\nthentication succeeds, the passphrase should be re-hashed using the currently preferred\nmethod.\n",
                "subsections": []
            },
            "FEATURE TEST MACROS": {
                "content": "<crypt.h> will define the macro CRYPTCHECKSALTAVAILABLE if cryptchecksalt is available in\nthe current version of libxcrypt.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Since full configurability is not yet implemented, the current implementation will only ever\nreturn CRYPTSALTOK (0) or CRYPTSALTINVALID when invoked.\n",
                "subsections": []
            },
            "PORTABILITY NOTES": {
                "content": "The function cryptchecksalt is not part of any standard.  It was added to libxcrypt in version\n4.3.0.\n",
                "subsections": []
            },
            "ATTRIBUTES": {
                "content": "For an explanation of the terms used in this section, see attributes(7).\n\n\n\n\n┌────────────────┬───────────────┬─────────┐\n│Interface       │ Attribute     │ Value   │\n├────────────────┼───────────────┼─────────┤\n│cryptchecksalt │ Thread safety │ MT-Safe │\n└────────────────┴───────────────┴─────────┘\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "crypt(3), cryptgensalt(3), crypt(5)\n\nlibxcrypt                      November 8, 2018                      libxcrypt",
                "subsections": []
            }
        }
    }
}