# shipthis game encryption: Encrypt the PCK of Your Godot Game

> Reference for the shipthis game encryption commands. Turn on PCK encryption for your Godot game, check the key fingerprint and export the key.

Source: https://shipth.is/docs/reference/game/encryption

## Description

Commands related to the encryption key for a specific game

ShipThis can encrypt the PCK of your game. It makes a key for the game and handles the export templates, so you do not need to build your own.

## Turn encryption on or off

```bash
# Turn on
shipthis game details --useEncryption true
shipthis game encryption status

# Turn off
shipthis game details --useEncryption false
```

The key is made when you turn on encryption, and builds of the game are then encrypted. If you turn encryption off, the game keeps its key.

To change the setting for one build, see [`game ship`](https://shipth.is/docs/reference/game/ship#building-with-encryption).

## Requirements

- **Godot 4.5 or newer**, on iOS and Android. With an older version, the build is refused when it starts.
- **A Gradle build on Android.** This is the default. An encrypted build fails if your export preset turns it off.
- **`encrypt_pck` off in your export preset, if encryption is off for the game.** With `encrypt_pck=true` and encryption off, the build fails. When encryption is on, ShipThis sets `encrypt_pck` for you.

## Use the key in your own exports

```bash
# Print the key
shipthis game encryption export

# Write the key to a file that only you can read
shipthis game encryption export key.txt
```

[warning]
Encryption stops casual extraction only. The key ships inside your game, so tools can pull it out. This is the same protection as [Godot's own PCK encryption](https://docs.godotengine.org/en/latest/engine_details/development/compiling/compiling_with_script_encryption_key.html).

On iOS, C# code is not in the PCK, so encryption does not cover it.

All files in the PCK are encrypted, and so is its file list. Only the PCK is encrypted: save files and other files your game writes to `user://` are not changed.

## App Store export compliance

PCK encryption is copy protection for your game files, which is exempt under US export rules. So `ITSAppUsesNonExemptEncryption` stays `false` in your iOS build, and App Store Connect does not ask about encryption. If your game adds its own encryption for other things, check your answer to Apple's export compliance question.

## Commands

### `game encryption export`

#### Description

Prints the encryption key of a game, or writes it to a file, so you can use it in your own Godot exports.

#### Help Output

```help
USAGE
  $ shipthis game encryption export [FILE] [-g <value>] [-f]

ARGUMENTS
  [FILE]  Name of the file to write the key to. Prints the key if not given

FLAGS
  -f, --force           Overwrite the file if it already exists
  -g, --gameId=<value>  The ID of the game

DESCRIPTION
  Prints the encryption key of a game, or writes it to a file, so you can use it in your own Godot exports.

EXAMPLES
  $ shipthis game encryption export

  $ shipthis game encryption export key.txt

  $ shipthis game encryption export key.txt --force

  $ shipthis game encryption export --gameId 0c179fc4
```

### `game encryption status`

#### Description

Shows if encryption is on for a game, and the fingerprint of its key.

#### Help Output

```help
USAGE
  $ shipthis game encryption status [-g <value>]

FLAGS
  -g, --gameId=<value>  The ID of the game

DESCRIPTION
  Shows if encryption is on for a game, and the fingerprint of its key.

EXAMPLES
  $ shipthis game encryption status

  $ shipthis game encryption status --gameId 0c179fc4
```
