Fixed the length of the key if the length of the key is 26, 24 or 5.