ios - How to test if a file has been encrypted with RNCryptor? -


i have ios7 app uses rncryptor keep it's documents safely tucked , secure.

problem is, app paranoid, uses encryption quite liberally seems resulting in occasional double encryption. (for complicated reasons backgrounding and/or terminating mainly.)

is there simple way of having @ files , testing see if they've encrypted (by app itself) ?

update: in end went basic option of attempting decryption. if not encrypted results in error code 2 "unknown header" means it's not encrypted.

add sentinel beginning of encrypted data after encryption. prior encryption test sentinel, if present don't encrypt, else encrypt , add sentinel.

on decryption remove sentinel prior decryption.

such pre-pending not uncommon, many times iv prepended.

since encrypted data indistinguishable randon data , algorythm same across implementations there no signature of spicific implementation performed encryption.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -