1 Encryption RPC api allows you to encrypt an arbitrary data bytes with some public key. Only owner of corresponding private key will be able to recover the original data stream.
5 1. Let's generate new novacoin address first.
8 4NZFZZS9b8iawVA8sYtHsqNbpq57envuBz
10 2. Then run validateaddress to dump its public key
12 > validateaddress 4NZFZZS9b8iawVA8sYtHsqNbpq57envuBz
15 "address" : "4NZFZZS9b8iawVA8sYtHsqNbpq57envuBz",
19 "pubkey" : "023ca82f71f40d18f5cf6a696367a4172b87d7b3db5f45086bdb4bd4a3e3e9bde9",
20 "iscompressed" : true,
24 3. Trying to encrypt hex representation of "Hello world!" string using this public key.
26 > encryptdata 023ca82f71f40d18f5cf6a696367a4172b87d7b3db5f45086bdb4bd4a3e3e9bde9 48656c6c6f20776f726c6421
27 02a2fe5afb10c40fc64552e1b81d8b4e991838d50c6a7129bd9f466eee29a5ab9def7cc5a3b1b526d59d06178fa4471b778e80bf8f72ae34889e58a4568f8ad2a3ecc9004a
29 4. Now we should be able to decrypt that cryptogram into original byte stream.
31 > decryptdata 4NZFZZS9b8iawVA8sYtHsqNbpq57envuBz 02a2fe5afb10c40fc64552e1b81d8b4e991838d50c6a7129bd9f466eee29a5ab9def7cc5a3b1b526d59d06178fa4471b778e80bf8f72ae34889e58a4568f8ad2a3ecc9004a
32 48656c6c6f20776f726c6421