{
    "content": [
        {
            "type": "text",
            "text": "# life_cycle-mac(7ssl) (man)\n\n**Summary:** lifecycle-mac - The MAC algorithm life-cycle\n\n## See Also\n\n- provider-mac(7)\n- EVPMAC(3)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **DESCRIPTION** (23 lines) — 2 subsections\n  - State Transition Diagram (35 lines)\n  - Formal State Transitions (14 lines)\n- **NOTES** (2 lines)\n- **SEE ALSO** (2 lines)\n- **HISTORY** (2 lines)\n- **COPYRIGHT** (9 lines)\n\n## Full Content\n\n### NAME\n\nlifecycle-mac - The MAC algorithm life-cycle\n\n### DESCRIPTION\n\nAll message authentication codes (MACs) go through a number of stages in their life-cycle:\n\nstart\nThis state represents the MAC before it has been allocated.  It is the starting state for\nany life-cycle transitions.\n\nnewed\nThis state represents the MAC after it has been allocated.\n\ninitialised\nThis state represents the MAC when it is set up and capable of processing input.\n\nupdated\nThis state represents the MAC when it is set up and capable of processing additional\ninput or generating output.\n\nfinaled\nThis state represents the MAC when it has generated output.\n\nfreed\nThis state is entered when the MAC is freed.  It is the terminal state for all life-cycle\ntransitions.\n\n#### State Transition Diagram\n\nThe usual life-cycle of a MAC is illustrated:\n+-------------------+\n|       start       |\n+-------------------+\n|\n| EVPMACCTXnew\nv\n+-------------------+\n|       newed       |\n+-------------------+\n|\n| EVPMACinit\nv\n+-------------------+\n+> |    initialised    | <+\n|  +-------------------+  |\n|    |                    |\n|    | EVPMACupdate     | EVPMACinit\n|    v                    |\nEVPMACinit |  +-------------------+  |\n|  |      updated      | -+\n|  +-------------------+\n|    |               |\n|    | EVPMACfinal | EVPMACfinalXOF\n|    v               v\n|  +-------------------+\n+- |      finaled      |\n+-------------------+\n|\n| EVPMACCTXfree\nv\n+-------------------+\n|       freed       |\n+-------------------+\n\n#### Formal State Transitions\n\nThis section defines all of the legal state transitions.  This is the canonical list.\nFunction Call                   --------------------- Current State ----------------------\nstart   newed    initialised   updated     finaled   freed\nEVPMACCTXnew                 newed\nEVPMACinit                         initialised initialised initialised initialised\nEVPMACupdate                                     updated     updated\nEVPMACfinal                                                  finaled\nEVPMACfinalXOF                                               finaled\nEVPMACCTXfree                freed   freed       freed       freed       freed\nEVPMACCTXgetparams                  newed    initialised   updated\nEVPMACCTXsetparams                  newed    initialised   updated\nEVPMACCTXgettableparams             newed    initialised   updated\nEVPMACCTXsettableparams             newed    initialised   updated\n\n### NOTES\n\nAt some point the EVP layer will begin enforcing the transitions described herein.\n\n### SEE ALSO\n\nprovider-mac(7), EVPMAC(3).\n\n### HISTORY\n\nThe provider MAC interface was introduced in OpenSSL 3.0.\n\n### COPYRIGHT\n\nCopyright 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-04-07                         LIFECYCLE-MAC(7SSL)\n\n"
        }
    ],
    "structuredContent": {
        "command": "life_cycle-mac",
        "section": "7ssl",
        "mode": "man",
        "summary": "lifecycle-mac - The MAC algorithm life-cycle",
        "synopsis": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "provider-mac",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/provider-mac/7/json"
            },
            {
                "name": "EVPMAC",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/EVPMAC/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": 14
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            }
        ]
    }
}