iso7816_decipher: refactoring