Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Question attribute "Encrypted" is used to enable data encryption

  • MikhailGorbunov
  • MikhailGorbunov's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 months 1 week ago #253705 by MikhailGorbunov
Thank you for your help.

Please Log in to join the conversation.

More
11 months 1 week ago - 11 months 1 week ago #253742 by OpenStudio
For reference, if someone may need to encrypt the data instead:
Code:
base64_encode(sodium_crypto_secretbox($data,sodium_hex2bin($encryptionnonce),sodium_hex2bin($encryptionsecretboxkey)))
Last edit: 11 months 1 week ago by OpenStudio.
The following user(s) said Thank You: DenisChenu, MikhailGorbunov

Please Log in to join the conversation.

  • MikhailGorbunov
  • MikhailGorbunov's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 months 1 week ago - 11 months 1 week ago #253798 by MikhailGorbunov

For reference, if someone may need to encrypt the data instead:
Code:
base64_encode(sodium_crypto_secretbox($data,sodium_hex2bin($encryptionnonce),sodium_hex2bin($encryptionsecretboxkey)))

 
Thank you OpenStudio.
Tryed to write, that no need to
Code:
base64_encode() on $data in that case. But
my messages was marked as spam.
 
Last edit: 11 months 1 week ago by MikhailGorbunov.
The following user(s) said Thank You: DenisChenu, OpenStudio

Please Log in to join the conversation.

More
11 months 1 week ago - 11 months 1 week ago #253807 by OpenStudio
Yes exactly, even in my case I didn't base64_encode() the $data parameter.

In nay case, this thread can be considered as solved!

Thanks a lot to everyone!
ps: i also have the spam error quite a lot
Last edit: 11 months 1 week ago by OpenStudio.

Please Log in to join the conversation.

  • MikhailGorbunov
  • MikhailGorbunov's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 months 1 week ago #253808 by MikhailGorbunov
Oh. I`m sorry then.
First code on my "A new reply has been posted" email was
Code:
[color=#999999]echo sodium_crypto_secretbox(base64_encode($data),sodium_bin2hex($encryptionnonce),sodium_bin2hex($encryptionsecretboxkey));[/color] [color=#999999]base64_decode => base64_encode
sodium_hex2bin => sodium_bin2hex[/color]

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose