diff --git a/Makefile b/Makefile index 7237f654e0..f1295d31b2 100644 --- a/Makefile +++ b/Makefile @@ -20,3 +20,9 @@ enable_analytics_for_debug: disable_analytics_for_debug: sed -i -e 's/config.enableAnalyticsForDebugBuilds=true/config.enableAnalyticsForDebugBuilds=false/g' analytics/gradle.properties + +encryption: + ./scripts/common/encrypt.sh + +decryption: + ./scripts/common/decrypt.sh \ No newline at end of file diff --git a/scripts/common/decrypt.sh b/scripts/common/decrypt.sh new file mode 100755 index 0000000000..113fab2bd6 --- /dev/null +++ b/scripts/common/decrypt.sh @@ -0,0 +1,25 @@ +# Prerequisite: brew install --cask gpg-suite + +echo Enter name of encrypted file including its extension +read -r input +if [[ -z $input ]]; then + echo "Input should not be empty"; exit 1 +fi + +echo Enter name for output file +read -r output +if [[ -z $input ]]; then + echo "Output should not be empty"; exit 1 +fi + +echo Enter key for decryption +read -r key +if [[ -z $key ]]; then + echo "Key should not be empty"; exit 1 +fi + +echo Starting decryption... + +gpg --quiet --batch --yes --decrypt --passphrase="${key}" --output ${output} ${input} + +echo Your decrypted file "${output}" is created. \ No newline at end of file diff --git a/scripts/common/encrypt.sh b/scripts/common/encrypt.sh new file mode 100755 index 0000000000..337f678a08 --- /dev/null +++ b/scripts/common/encrypt.sh @@ -0,0 +1,25 @@ +# Prerequisite: brew install --cask gpg-suite + +echo Enter input filename +read -r input +if [[ -z $input ]]; then + echo "Input should not be empty"; exit 1 +fi + +echo Enter output filenmae +read -r output +if [[ -z $output ]]; then + echo "Output should not be empty"; exit 1 +fi + +echo Enter key for encryption +read -r key +if [[ -z $key ]]; then + echo "Key should not be empty"; exit 1 +fi + +echo Starting encryption... + +gpg --batch --yes --passphrase="${key}" --cipher-algo AES256 --symmetric --output ${output}.gpg ${input} + +echo Your encrypted file "${output}.gpg" is created. \ No newline at end of file diff --git a/scripts/distribution/anytype-debug-service-account-key.gpg b/scripts/distribution/anytype-debug-service-account-key.gpg index ae58aa29d6..cea82fa048 100644 Binary files a/scripts/distribution/anytype-debug-service-account-key.gpg and b/scripts/distribution/anytype-debug-service-account-key.gpg differ diff --git a/scripts/release/app-release.gpg b/scripts/release/app-release.gpg index a081977054..8206a8f149 100644 Binary files a/scripts/release/app-release.gpg and b/scripts/release/app-release.gpg differ