{
  "$comment": "GENERATED by TimeBasedOneTimePasswords/tools/generate-test-vectors.py (OpenChargingTechnology/Whitepapers) - do not edit by hand. Regenerate by rerunning the generator.",
  "specification": "Open Charging Technology TOTP Token Format 1.0",
  "description": "Inputs that implementations MUST reject, with the shared error message text. Harnesses assert that the thrown message starts with 'expectedError'. See the file's 'knownDeviations'/'notApplicable' semantics in test-vectors/README.md.",
  "vectors": [
    {
      "id": "secret-empty",
      "description": "An empty shared secret is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": ""
      },
      "expectedError": "The given shared secret must not be null or empty!"
    },
    {
      "id": "secret-whitespace-only",
      "description": "A whitespace-only shared secret trims to empty and is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "        "
      },
      "expectedError": "The given shared secret must not be null or empty!"
    },
    {
      "id": "secret-too-short",
      "description": "A 15 character shared secret is rejected (minimum is 16).",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging"
      },
      "expectedError": "The length of the given shared secret must be at least 16 characters!"
    },
    {
      "id": "secret-inner-whitespace",
      "description": "A shared secret with interior whitespace is rejected (checked before the length).",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure Charging!"
      },
      "expectedError": "The given shared secret must not contain any whitespace characters!"
    },
    {
      "id": "length-3",
      "description": "A token length below 4 is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "totpLength": 3
      },
      "expectedError": "The expected length of the TOTP must be between 4 and 255 characters!"
    },
    {
      "id": "length-256",
      "description": "A token length above 255 is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "totpLength": 256
      },
      "expectedError": "The expected length of the TOTP must be between 4 and 255 characters!"
    },
    {
      "id": "length-fractional",
      "description": "A non-integer token length is rejected. (Unrepresentable in the C# API: the parameter is a UInt32.)",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "totpLength": 12.5
      },
      "expectedError": "The expected length of the TOTP must be between 4 and 255 characters!",
      "notApplicable": [
        "hermod"
      ]
    },
    {
      "id": "validity-zero",
      "description": "A validity time of zero seconds is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "validityTimeSeconds": 0
      },
      "expectedError": "The validity time must be a positive integer number of seconds!"
    },
    {
      "id": "validity-negative",
      "description": "A negative validity time is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "validityTimeSeconds": -30
      },
      "expectedError": "The validity time must be a positive integer number of seconds!"
    },
    {
      "id": "validity-fractional",
      "description": "A non-integer validity time is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "validityTimeSeconds": 4.5
      },
      "expectedError": "The validity time must be a positive integer number of seconds!"
    },
    {
      "id": "timestamp-negative",
      "description": "A timestamp before the Unix epoch is rejected.",
      "input": {
        "unixTimestampMillis": -1000,
        "sharedSecret": "secure!Charging!"
      },
      "expectedError": "The timestamp must be a non-negative Unix timestamp in milliseconds!"
    },
    {
      "id": "hash-sha1",
      "description": "SHA-1 is not part of the format.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "hashAlgorithm": "sha1"
      },
      "expectedError": "The hash algorithm must be one of: sha256, sha384, sha512!"
    },
    {
      "id": "hash-md5",
      "description": "MD5 is not part of the format.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "hashAlgorithm": "md5"
      },
      "expectedError": "The hash algorithm must be one of: sha256, sha384, sha512!"
    },
    {
      "id": "alphabet-empty",
      "description": "An explicitly empty alphabet is rejected (it does not fall back to the default).",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "alphabet": ""
      },
      "expectedError": "The given alphabet must not be null or empty!"
    },
    {
      "id": "alphabet-whitespace-only",
      "description": "A whitespace-only alphabet trims to empty and is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "alphabet": "   "
      },
      "expectedError": "The given alphabet must not be null or empty!"
    },
    {
      "id": "alphabet-3-chars",
      "description": "An alphabet with fewer than 4 characters is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "alphabet": "abc"
      },
      "expectedError": "The given alphabet must contain at least 4 characters!"
    },
    {
      "id": "alphabet-duplicates",
      "description": "An alphabet with duplicate characters is rejected.",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "alphabet": "abcdeff"
      },
      "expectedError": "The given alphabet must not contain duplicate characters!"
    },
    {
      "id": "alphabet-inner-whitespace",
      "description": "An alphabet with interior whitespace is rejected (duplicates are checked first).",
      "input": {
        "unixTimestampMillis": 1716423785000,
        "sharedSecret": "secure!Charging!",
        "alphabet": "ab cdef"
      },
      "expectedError": "The given alphabet must not contain any whitespace characters!"
    }
  ]
}
