def decipher(self, p1, p2, data): plain = eac.EAC_decrypt(self.eac_ctx, data) if not plain: eac.print_ossl_err() raise SwError(SW["ERR_NOINFO69"]) return plain
def decrypt(self, data): """Decrypt a block of data using the secret established by the PACE protocol. This method can only be used after a successful run of eac. """ dec = eac.EAC_decrypt(self.ctx, data) if not dec or not eac.EAC_increment_ssc(self.ctx): raise PACEException("Failed to decrypt the following data: " + data) return dec