windowOrSelfObject = () => {
  return typeof window !== 'undefined'
    ? window
    : self
}
Source on tag length:
https://crypto.stackexchange.com/questions/26783/ciphertext-and-tag-size-and-iv-transmission-with-aes-in-gcm-mode/26787