Equivalent of Data Protection API on Linux

Multi platform data protection


  1. All the sensitive settings should be encrypted in the configuration file
  2. The decryption keys should be stored in environment-variables

Then the application should decrypt the settings on the fly, when it needs those.

How can I encrypt my data using apple's data protection API?

Enable Data protection

Sample Image

Create an entitlements plist with your chosen encryption type.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DataProtectionClass</key>
<string>NSFileProtectionComplete</string>
</dict>
</plist>


Related Topics



Leave a reply



Submit