Skip to content

try to encrypt binary using easy-encryption #12

@PixelClear

Description

@PixelClear

Hello

I am trying to encrypt and decrypt the binary data.
It somehow doesn't work. The size of contents before encryption is same as after encryption but somehow the contents do not match.

`std::string sBin( binary.begin(), binary.end() ); // binary is char vector

std::string encryptedBinary = encrypt( sBin, Key );

std::string decryptedBinary = decrypt( encryptedBinary, Key );

if ( sBin.compare( decryptedBinary ) != 0 ) std::cout << sBin << " is not " << decryptedBinary << '\n';`

Somehow these never match. I tried same code for normal text works well.
Can we do encryption of binary data ? if yes can you please give sample ? or encryption freaks out on some special character in binary data?

Thanks

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