def encrypt_gcm(aes_key, content): iv = os.urandom(12) aesgcm = AESGCM(aes_key) result = aesgcm.encrypt(iv, content, None) return result, iv