{
  "id": "02",
  "content": [
    {
      "type": "heading",
      "text": "Hashing vs Encryption vs Encoding"
    },
    {
      "type": "text",
      "html": "<ul><li><strong>Encoding</strong>: reversible (Base64)</li><li><strong>Encryption</strong>: reversible with a key (AES)</li><li><strong>Hashing</strong>: one-way (bcrypt/Argon2)</li></ul>"
    },
    {
      "type": "text",
      "html": "<pre><code class='language-php'>$hash = password_hash($pwd, PASSWORD_ARGON2ID);\nif (password_verify($login, $hash)) { /* ok */ }\n</code></pre>"
    }
  ],
  "quiz": {
    "questions": [
      {
        "id": "q1",
        "type": "single",
        "text": "Best for storing user passwords?",
        "options": [
          {
            "id": "a",
            "text": "Argon2/bcrypt hashing"
          },
          {
            "id": "b",
            "text": "Base64"
          },
          {
            "id": "c",
            "text": "Plain AES"
          }
        ],
        "correct": [
          "a"
        ]
      },
      {
        "id": "q2",
        "type": "single",
        "text": "Hashing is:",
        "options": [
          {
            "id": "a",
            "text": "One-way"
          },
          {
            "id": "b",
            "text": "Two-way"
          },
          {
            "id": "c",
            "text": "Compression"
          }
        ],
        "correct": [
          "a"
        ]
      }
    ]
  }
}