Merge pull request #121 from ShuoWangNSL/master

Delete trailing whitespace
pull/124/head
Baohua Yang 2018-07-02 05:42:54 -07:00 committed by GitHub
commit 2df08e1d7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
# Using EncCC # Using EncCC
To test `EncCC` you need to first generate an AES 256 bit key as a base64 To test `EncCC` you need to first generate an AES 256 bit key as a base64
encoded string so that it can be passed as JSON to the peer chaincode encoded string so that it can be passed as JSON to the peer chaincode
invoke's transient parameter. invoke's transient parameter.
Note: Before getting started you must use govendor to add external dependencies. Please issue the following commands inside the "enccc_example" folder: Note: Before getting started you must use govendor to add external dependencies. Please issue the following commands inside the "enccc_example" folder:
@ -20,7 +20,7 @@ follows:
Note: the following assumes the env is initialized and peer has joined channel "my-ch". Note: the following assumes the env is initialized and peer has joined channel "my-ch".
``` ```
peer chaincode invoke -n enccc -C my-ch -c '{"Args":["ENCRYPT","key1","value1"]}' --transient "{\"ENCKEY\":\"$ENCKEY\"}" peer chaincode invoke -n enccc -C my-ch -c '{"Args":["ENCRYPT","key1","value1"]}' --transient "{\"ENCKEY\":\"$ENCKEY\"}"
``` ```
This call will encrypt using a random IV. This may be undesirable for This call will encrypt using a random IV. This may be undesirable for
@ -36,7 +36,7 @@ IV=`openssl rand 16 -base64`
Then, the IV may be specified in the transient field Then, the IV may be specified in the transient field
``` ```
peer chaincode invoke -n enccc -C my-ch -c '{"Args":["ENCRYPT","key2","value2"]}' --transient "{\"ENCKEY\":\"$ENCKEY\",\"IV\":\"$IV\"}" peer chaincode invoke -n enccc -C my-ch -c '{"Args":["ENCRYPT","key2","value2"]}' --transient "{\"ENCKEY\":\"$ENCKEY\",\"IV\":\"$IV\"}"
``` ```
Two such invocations will produce equal KVS writes, which can be endorsed by multiple nodes. Two such invocations will produce equal KVS writes, which can be endorsed by multiple nodes.
@ -56,7 +56,7 @@ invocation would persist the result in the ledger for all channel readers to
see whereas a query can be discarded and so the result remains confidential. see whereas a query can be discarded and so the result remains confidential.
To test signing and verifying, you also need to generate an ECDSA key for the appopriate To test signing and verifying, you also need to generate an ECDSA key for the appopriate
curve, as follows. curve, as follows.
``` ```
On Intel: On Intel:
@ -77,4 +77,4 @@ And similarly to retrieve them using a query
``` ```
peer chaincode query -n enccc -C my-ch -c '{"Args":["DECRYPTVERIFY","key3"]}' --transient "{\"DECKEY\":\"$DECKEY\",\"VERKEY\":\"$VERKEY\"}" peer chaincode query -n enccc -C my-ch -c '{"Args":["DECRYPTVERIFY","key3"]}' --transient "{\"DECKEY\":\"$DECKEY\",\"VERKEY\":\"$VERKEY\"}"
``` ```

View File

@ -207,4 +207,4 @@ Capabilities:
# modification of which would cause imcompatibilities. Users should # modification of which would cause imcompatibilities. Users should
# leave this flag set to true. # leave this flag set to true.
# TODO, re-enable once the new lifecycle work is complete # TODO, re-enable once the new lifecycle work is complete
V1_1: false V1_1: false

View File

@ -207,4 +207,4 @@ Capabilities:
# modification of which would cause imcompatibilities. Users should # modification of which would cause imcompatibilities. Users should
# leave this flag set to true. # leave this flag set to true.
# TODO, re-enable once the new lifecycle work is complete # TODO, re-enable once the new lifecycle work is complete
V1_1: false V1_1: false