The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

bencrypt 845 B

il y a 5 ans
il y a 4 ans
il y a 5 ans
123456789101112131415161718192021
  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. # Encrypt data using the Bubble database's encryption key
  6. #
  7. SCRIPT="${0}"
  8. SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)
  9. . ${SCRIPT_DIR}/bubble_common
  10. if [[ -z "${BUBBLE_DB_ENCRYPTION_KEY}" ]] ; then
  11. if [[ -f "${HOME}/.BUBBLE_DB_ENCRYPTION_KEY" ]] ; then
  12. BUBBLE_DB_ENCRYPTION_KEY=$(cat ${HOME}/.BUBBLE_DB_ENCRYPTION_KEY)
  13. elif [[ -f "/home/bubble/.BUBBLE_DB_ENCRYPTION_KEY" ]] ; then
  14. BUBBLE_DB_ENCRYPTION_KEY=$(cat /home/bubble/.BUBBLE_DB_ENCRYPTION_KEY)
  15. else
  16. die "BUBBLE_DB_ENCRYPTION_KEY env var not defined, and no .BUBBLE_DB_ENCRYPTION_KEY file found"
  17. fi
  18. fi
  19. BUBBLE_DB_ENCRYPTION_KEY=${BUBBLE_DB_ENCRYPTION_KEY} exec ${SCRIPT_DIR}/bubble crypt -f encrypt "${@}"