File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
main/java/com/iterable/iterableapi
test/java/com/iterable/iterableapi Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class IterableDataEncryptor {
3434 }
3535 }
3636
37- fun clearKeyAndData ( sharedPrefs : SharedPreferences ) {
37+ fun resetKeys ( ) {
3838 try {
3939 keyManager.deleteKey()
4040 keyManager.generateKey()
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ class IterableKeychain {
6666 .remove(KEY_AUTH_TOKEN )
6767 .apply ()
6868
69- encryptor.clearKeyAndData(sharedPrefs )
69+ encryptor.resetKeys( )
7070 decryptionFailureHandler?.onDecryptionFailed(e ? : Exception (" Unknown decryption error" ))
7171 }
7272
Original file line number Diff line number Diff line change @@ -130,12 +130,12 @@ public void testDecryptTamperedData() {
130130 }
131131
132132 @ Test
133- public void testClearKeyAndData () {
133+ public void testresetKeys () {
134134 String originalText = "test data" ;
135135 String encrypted = encryptor .encrypt (originalText );
136136
137137 // Clear the key
138- encryptor .clearKeyAndData ( sharedPreferences );
138+ encryptor .resetKeys ( );
139139
140140 // Try to decrypt the data encrypted with the old key
141141 try {
@@ -180,7 +180,7 @@ public void testKeyRegeneration() throws Exception {
180180 String encrypted1 = encryptor1 .encrypt (testData );
181181
182182 // Delete the key
183- encryptor1 .clearKeyAndData ( sharedPreferences );
183+ encryptor1 .resetKeys ( );
184184
185185 // Create second encryptor which should generate a new key
186186 IterableDataEncryptor encryptor2 = new IterableDataEncryptor ();
@@ -279,7 +279,7 @@ public void testDecryptionAfterKeyLoss() {
279279 String encrypted = encryptor .encrypt (testData );
280280
281281 // Clear the key and generate a new one
282- encryptor .clearKeyAndData ( sharedPreferences );
282+ encryptor .resetKeys ( );
283283
284284 try {
285285 encryptor .decrypt (encrypted );
You can’t perform that action at this time.
0 commit comments