Skip to content

Issue when encrypting strings with 16 characters #1

@eko3alpha

Description

@eko3alpha

I noticed an issue when running unit tests when encrypting test strings of 16 characters. When it decrypts php thinks the string is 32 characters when doing a var_dump.

string(64) "XUmDMnbXNE65otgE41MSBlJr7cg5VYyxmysw/AmdylRPZakIzYWBRfHCCnwKlc2m"
string(32) "1234567890123456����������������"
string(16) "1234567890123456"
Fail: EncryptionTest -> test_encrypt_decrypt -> Equal expectation fails at character 16 with [1234567890123456] and [1234567890123456����������������]

as you can see the characters are the same, but I cant get == or === to work on it.

This only appears to be true when encrypting anything of 16 characters. Everything else passes the unit tests. Not exactly sure why this happens, just thought you may want to know.

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