Password based encryption  From Nokia Developer Wiki Jump to:
navigation, search Article Metadata Code ExampleArticle Created:
Paul.Todd (23 Oct 2007) Last edited: hamishwillee (03 Feb 2012)
When storing sensitive data it is very important that existing
encryption support is used rather than "hand rolled" solutions
written by inexperienced security developers. Getting
cryptographic solutions right is very hard and best left to
experts. To this end Symbian have provided a subset of the
cryptographic libraries for use by third parties and these
should be used to store sensitive data since they are
cryptographically secure. This code snippet shows how to
securely store data so that the only way it may be retrieved is
to supply a password.  The first code snippet contains the code
to encrypt a blob of text with a password and write that out to
a stream. The second code snipped reverses the first, in that
given a password and a stream, the encrypted blob will be
decrypted and the plain text returned.  API Notes