public void StoreStringProtected(string dataIdentifier, string data)
{
byte[] protectedData = ProtectedData.Protect(Encoding.UTF8.GetBytes(data), Encoding.UTF8.GetBytes("hockeyAppIsCool"));
IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForApplication();
using (IsolatedStorageFileStream writestream = new IsolatedStorageFileStream(dataIdentifier + ".crypt", FileMode.Create, FileAccess.Write, file))
{
using (Stream writer = new StreamWriter(writestream).BaseStream)
{
writer.Write(protectedData, 0, protectedData.Length);
}
}
}