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
  • Away
  • Junior Member
  • Junior Member
More
4 months 1 week ago #253705 by MikhailGorbunov
Thank you for your help.

Please Log in to join the conversation.

More
4 months 6 days ago - 4 months 6 days 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: 4 months 6 days 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
  • Away
  • Junior Member
  • Junior Member
More
4 months 6 days ago - 4 months 6 days 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: 4 months 6 days ago by MikhailGorbunov.
The following user(s) said Thank You: DenisChenu, OpenStudio

Please Log in to join the conversation.

More
4 months 6 days ago - 4 months 6 days 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: 4 months 6 days ago by OpenStudio.

Please Log in to join the conversation.

  • MikhailGorbunov
  • MikhailGorbunov's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
More
4 months 6 days 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.

Lime-years ahead

Online-surveys for every purse and purpose