Skip to content

Instantly share code, notes, and snippets.

@farinspace
Last active April 27, 2018 04:16
Show Gist options
  • Save farinspace/51240388b585df69ceadc33168a4d198 to your computer and use it in GitHub Desktop.
Save farinspace/51240388b585df69ceadc33168a4d198 to your computer and use it in GitHub Desktop.
Generating and encrypting wallet data to file

Encrypt a file

openssl enc -aes-256-cbc -a -in wallet-info.txt -out wallet-info.txt.enc

Decrypt a file

openssl enc -aes-256-cbc -d -a -in wallet-info.txt.enc -out wallet-info.txt

Generate a random password and write it to a file

openssl rand -base64 64 > password.txt

Generate wallet and encrypt details (address, view-key and mnemonic)

WALLET_NAME="wallet"; echo "exit" | ./monero-wallet-cli --mnemonic-language "English" --password "$(openssl rand -base64 64)" --generate-new-wallet "${WALLET_NAME}" | openssl enc -aes-256-cbc -a -out "${WALLET_NAME}-info.txt.enc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment