"bitcoin-cli encryptwallet" - Set Wallet Password

This section describes how to use 'bitcoin-cli encryptwallet' command to set a password to protect my wallet.

If you have obtained some Bitcoin funds in your wallet, you should consider to encrypt with a password using the "bitcoin-cli encryptwallet" command.

Here is what the "bitcoin-cli encryptwallet" can do for us:

C:\>\local\bitcoin-0.15.1\bin\bitcoin-cli -testnet help encryptwallet

encryptwallet "passphrase"

Encrypts the wallet with 'passphrase'. This is for first time encryption.
After this, any calls that interact with private keys such as sending or 

will require the passphrase to be set prior the making these calls.
Use the walletpassphrase call for this, and then walletlock call.
If the wallet is already encrypted, use the walletpassphrasechange call.
Note that this will shutdown the server.

1. "passphrase"    (string) The pass phrase to encrypt the wallet with. 
It must be at least 1 character, but should be long.


Encrypt your wallet
> bitcoin-cli encryptwallet "my pass phrase"

Now set the passphrase to use the wallet, such as for signing or sending 
> bitcoin-cli walletpassphrase "my pass phrase"

Now we can do something like sign
> bitcoin-cli signmessage "address" "test message"

Now lock the wallet again by removing the passphrase
> bitcoin-cli walletlock

Ok. Let me encrypt my test wallet.

C:\>\local\bitcoin-0.15.1\bin\bitcoin-cli -testnet encryptwallet xxxxxx

wallet encrypted; Bitcoin server stopping, restart to run with encrypted 
wallet. The keypool has been flushed and a new HD seed was generated (if 
you are using HD). You need to make a new backup.

Ok. I restarted my Bitcoin Core Daemon on the Test Network.

Table of Contents

 About This Book

 Introduction of Bitcoin

 Bitcoin Blockchain

 Bitcoin Wallet

Bitcoin Core

 Bitcoin Core Programs

 Bitcoin Core Daemon

 Bitcoin Core CLI

 Bitcoin Core CLI Commands

 Access Bitcoin Test Network "-testnet"

 bitcoin-cli Network Commands

 "bitcoin-cli getblock" Command

 bitcoin-cli Transaction Commands

 bitcoin-cli Wallet Commands

"bitcoin-cli encryptwallet" - Set Wallet Password

 "bitcoin-cli walletpassphrase" - Unlock Wallet

 "bitcoin-cli backupwallet" - Backup Wallet

 Bitcoin Transaction

 Bitcoin-Qt - Bitcoin Core GUI

 Bitcoin Mining

 Bitcoin Consensus Rules

 Bitcoin Block Data Structure

 Bitcoin Transaction Data Structure

 Bitcoin Blockchain APIs

 Copay - Bitcoin Wallet

 Archived Tutorials


 Full Version in PDF/EPUB