public override void SetUp()
        {
            var salt = new byte[] { 104, 12, 112, 82, 85, 10, 11, 61, 15, 54, 44, 66, 117, 89, 64, 110, 53, 123, 33 };

            // Prepare PreferenceObfuscator instance
            sp = Context.GetSharedPreferences(Filename, FileCreationMode.Private);
            string deviceId = Settings.Secure.GetString(Context.ContentResolver, Settings.Secure.AndroidId);
            IObfuscator o = new AesObfuscator(salt, Context.PackageName, deviceId);
            op = new PreferenceObfuscator(sp, o);

            // Populate with test data
            op.PutString("testString", "Hello world");
            op.Commit();
        }
示例#2
0
        public override void SetUp()
        {
            var salt = new byte[] { 104, 12, 112, 82, 85, 10, 11, 61, 15, 54, 44, 66, 117, 89, 64, 110, 53, 123, 33 };

            // Prepare PreferenceObfuscator instance
            sp = Context.GetSharedPreferences(Filename, FileCreationMode.Private);
            string      deviceId = Settings.Secure.GetString(Context.ContentResolver, Settings.Secure.AndroidId);
            IObfuscator o        = new AesObfuscator(salt, Context.PackageName, deviceId);

            op = new PreferenceObfuscator(sp, o);

            // Populate with test data
            op.PutString("testString", "Hello world");
            op.Commit();
        }