Adding "throw" exception for missing/ too short shared secret key