Skip to content

4. Encryption and decryption

Damon东哥 edited this page Mar 20, 2025 · 2 revisions

If there is sensitive information that you don't want users to see when debugging, you can set encryption in two simple steps

// 1. Set the encryption password,  32 characters
DDLoggerSwift.privacyLogPassword = "12345678901234561234567890123456"

// 2, output encrypted content
printPrivacy("This is test data 222 for encrypted data")

4.2 Decrypt the contents of the display window

After the setting, the display in the display window is This content is encrypted, please view it after decryption, enter the set encryption password and click decrypt to display the info encrypted content.

4.1. Decrypting shared files

  • If the data has been decrypted in the display window, the content of the shared file will not be encrypted at this time, and all content will be displayed.
  • If it is not decrypted in the display window, the content of the file shared at this time is AES encrypted content, you can search the AES Online Decryption Website to decrypt the content, and the settings are as follows:

  • Mode: CBC
  • Fill: Pkcs7
  • Data block: 128 bits
  • Offset: abcdefghijklmnop
  • Encoding: Base64
  • Character set: UTF8
  • Password: The password you set in the SDK yourself

Then click Decrypt.

Here are a few online sites recommended, you can also Google it by yourself

Clone this wiki locally