{
    "content": [
        {
            "type": "text",
            "text": "# life_cycle-digest (man)\n\n## NAME\n\nlifecycle-digest - The digest algorithm life-cycle\n\n## DESCRIPTION\n\nAll message digests (MDs) go through a number of stages in their life-cycle:\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION** (2 subsections)\n- **NOTES**\n- **SEE ALSO**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "life_cycle-digest",
        "section": "",
        "mode": "man",
        "summary": "lifecycle-digest - The digest algorithm life-cycle",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "provider-digest",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/provider-digest/7/json"
            },
            {
                "name": "EVPDigestInit",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/EVPDigestInit/3/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 23,
                "subsections": [
                    {
                        "name": "State Transition Diagram",
                        "lines": 35
                    },
                    {
                        "name": "Formal State Transitions",
                        "lines": 15
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "lifecycle-digest - The digest algorithm life-cycle\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "All message digests (MDs) go through a number of stages in their life-cycle:\n\nstart\nThis state represents the MD before it has been allocated.  It is the starting state for\nany life-cycle transitions.\n\nnewed\nThis state represents the MD after it has been allocated.\n\ninitialised\nThis state represents the MD when it is set up and capable of processing input.\n\nupdated\nThis state represents the MD when it is set up and capable of processing additional input\nor generating output.\n\nfinaled\nThis state represents the MD when it has generated output.\n\nfreed\nThis state is entered when the MD is freed.  It is the terminal state for all life-cycle\ntransitions.\n",
                "subsections": [
                    {
                        "name": "State Transition Diagram",
                        "content": "The usual life-cycle of a MD is illustrated:\n+-------------------+\n|       start       |\n+-------------------+\n|\n| EVPMDCTXnew\nv\n+-------------------+         EVPMDCTXreset\n|       newed       | <------------------------------+\n+-------------------+                                |\n|                                                  |\n| EVPDigestInit                                   |\nv                                                  |\n+-------------------+                                |\n+--> |    initialised    | <+ EVPDigestInit              |\n|    +-------------------+  |                             |\n|      |                    |      EVPDigestUpdate       |\n|      | EVPDigestUpdate   |    +------------------+     |\n|      v                    |    v                  |     |\n|    +------------------------------------------------+   |\nEVPDigestInit |    |                    updated                     | --+\n|    +------------------------------------------------+   |\n|      |                    |                             |\n|      | EVPDigestFinal    | EVPDigestFinalXOF          |\n|      v                    v                             |\n|    +------------------------------------------------+   |\n+--- |                    finaled                     | --+\n+------------------------------------------------+\n|\n| EVPMDCTXfree\nv\n+-------------------+\n|       freed       |\n+-------------------+\n"
                    },
                    {
                        "name": "Formal State Transitions",
                        "content": "This section defines all of the legal state transitions.  This is the canonical list.\nFunction Call                --------------------- Current State ----------------------\nstart   newed    initialised   updated     finaled   freed\nEVPMDCTXnew               newed\nEVPDigestInit                    initialised initialised initialised initialised\nEVPDigestUpdate                                updated     updated\nEVPDigestFinal                                             finaled\nEVPDigestFinalXOF                                          finaled\nEVPMDCTXfree              freed   freed       freed       freed       freed\nEVPMDCTXreset                     newed       newed       newed       newed\nEVPMDCTXgetparams                newed    initialised   updated\nEVPMDCTXsetparams                newed    initialised   updated\nEVPMDCTXgettableparams           newed    initialised   updated\nEVPMDCTXsettableparams           newed    initialised   updated\n"
                    }
                ]
            },
            "NOTES": {
                "content": "At some point the EVP layer will begin enforcing the transitions described herein.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "provider-digest(7), EVPDigestInit(3)\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.\n\nLicensed under the Apache License 2.0 (the \"License\").  You may not use this file except in\ncompliance with the License.  You can obtain a copy in the file LICENSE in the source\ndistribution or at <https://www.openssl.org/source/license.html>.\n\n\n\n3.0.2                                        2026-06-02                      LIFECYCLE-DIGEST(7SSL)",
                "subsections": []
            }
        }
    }
}