App Security API Code snippets

This section contains a set of code snippets demonstrating usage of ‘App Security API’.

Secure Data snippets

  • Snippet 1 - Secure Data sealing

    - Create a new instance of secure data (using plaintext data)
    - Get the sealed blob of the secure data instance (data encrypted and signed)

  • Snippet 2 - Secure Data unsealing

    - Create an instance of secure data (using sealed data blob)
    - Get the data (plain text) of the secure data instance

  • Snippet 3 - Secure Data sealing with extra key

    - Create an instance of secure data to hold the extra key
    - Create an additional instance of secure data (using plain text) with extra key (the first instance)
    - Get the sealed blob of the second secure data instance (data encrypted and signed)

  • Snippet 4 - Secure Data with extra key unsealing

    - Create an instance of secure data (using sealed data blob and extra key
    - Get the data (plain text) of the secure data instance

Secure Storage snippets

Secure Transport snippets

For more complete information about compiler optimizations, see our Optimization Notice.