Skip to content

test : add unit test for decryptToken null handling on invalid iv #521

@tmdeveloper007

Description

@tmdeveloper007

Summary of What Needs to be Done:
Add a unit test that verifies decryptToken returns null when given an invalid IV that does not match the required 24-character hex format.

Changes that Need to be Made:

  • Add test case in test/crypto.test.js that calls decryptToken with valid encrypted data but invalid IV (e.g., wrong length or non-hex characters) and asserts null is returned

Impact that it would Provide:

  • Improves test coverage for input validation in the crypto module

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions