now also working when SecretKey = null