Cryptanalysis and improvement of an image encryption algorithm based on hyper-chaotic system and dynamic S-box