Skip to content

Encrypting a file as a string removes the line breaks #19

@thahgr

Description

@thahgr

Hello, I am trying to use your library to encrypt some csv files.

First I transform the file to a string. Maybe this approach is wrong.

  • I am doing MultipartFile file to get the file from a Rest request
  • content = new String(file.getBytes());
  • then encrypt and store
  • retrieve and decrypt,
  • return the file by content.getBytes()

The encryption and decryption work fine!!

However, during this process the csv seems to loose the line breaks and all comes as one line

Do you have any suggestions on how to tackle this problem ??

ps I have checked that just by uploading file, encoding to string, then decode it and return as a file maintains all line breaks, so I figure the encoding must play some role

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