Switching to using SecretKey instead of byte array.