imporved encryption API

This commit is contained in:
Fabian Vogelsteller 2017-03-28 16:08:37 +02:00
parent ffb63939f3
commit 8f66750d07
No known key found for this signature in database
GPG Key ID: E51EADA77F1A4124
1 changed files with 2 additions and 2 deletions

View File

@ -365,7 +365,7 @@ Example
.. code-block:: javascript .. code-block:: javascript
web3.eth.accounts.encrypt('0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318', 'test!$@'); web3.eth.accounts.encrypt('0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318', 'test!$@');
> "0b5dbb6204fe512x4c0883a69102937d62314719617082792x4c0883a69102937d6231471ae468d01a3f362318" > {"address":"4bf2a80d5c7b337da05b446081f95d0a34f79e7f","Crypto":{"cipher":"aes-128-ctr","ciphertext":"acfe42eed2d102e9bd2383c5c3f9bfdcb346a152dd7b9a3d18bab270f323f683","cipherparams":{"iv":"22cb99fa11a257f3c5b7d19ddb8bb5a4"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":261144,"p":1,"r":5,"salt":"81e332698874fc168bfde32f1529648df2fb5d9b2494e7c418ff563f18cbce86"},"mac":"0e82211205dcfb8deaff19e8433f9e966f2d72c488ac54b0b4f6ab1cf594a542"},"id":"e1268f6b-1220-4f7a-a6de-f2ad695831dc","version":3}
@ -400,7 +400,7 @@ Example
.. code-block:: javascript .. code-block:: javascript
web3.eth.accounts.decrypt('0b5dbb6204fe512x4c0883a69102937d62314719617082792x4c0883a69102937d6231471ae468d01a3f362318', 'test!$@'); web3.eth.accounts.decrypt({"address":"4bf2a80d5c7b337da05b446081f95d0a34f79e7f","Crypto":{"cipher":"aes-128-ctr","ciphertext":"acfe42eed2d102e9bd2383c5c3f9bfdcb346a152dd7b9a3d18bab270f323f683","cipherparams":{"iv":"22cb99fa11a257f3c5b7d19ddb8bb5a4"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":261144,"p":1,"r":5,"salt":"81e332698874fc168bfde32f1529648df2fb5d9b2494e7c418ff563f18cbce86"},"mac":"0e82211205dcfb8deaff19e8433f9e966f2d72c488ac54b0b4f6ab1cf594a542"},"id":"e1268f6b-1220-4f7a-a6de-f2ad695831dc","version":3}, 'test!$@');
> "0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318" > "0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"