Closed Asmoyed closed 4 years ago
The cardwriter writes Strings while the data component probably returns an byte Array. Cant really test it right now as your test script wont work for me at all.
Could you try to convert the data with component.data.encode64(data)
before writing it and decoding it after reading with component.data.decode64(data)
that might work around the issue
It seems to be working Thanks ^^
added this information to the wiki https://github.com/PC-Logix/OpenSecurity/wiki/CardWriter#binary-data
Closing this as it seems to be resolved.
Describe the bug Mag card data write dosen't work, I'm trying to write encoded data with the component data from OC, but the data on the does not match the result from the encryption function
In which environment did the Bug appear? Singleplayer
To Reproduce Encrypt a string with OC encrypt function Write the result onto a mag card Read the data of the card Result and card data arent equal
Expected behavior The encrypted data should be properly written onto the card
Screenshots / Code Snippet
Minecraft:
Additional context Nothing more to say