Skip to content

Commit

Permalink
[FAB-6439]test Range func returning decrypted vals
Browse files Browse the repository at this point in the history
Change-Id: I7468363d528b191a698567c952924689935da02d
Signed-off-by: nishi.nidamarty <nishi.nidamarty@itpeoplecorp.com>
  • Loading branch information
2016Nishi committed Oct 18, 2017
1 parent 7461c39 commit 4c59a36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/chaincode/go/enccc_example/enccc_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (t *EncCC) EncrypterSigner(stub shim.ChaincodeStubInterface, f string, args

type keyValuePair struct {
Key string `json:"key"`
Value []byte `json:"value"`
Value string `json:"value"`
}

// RangeDecrypter shows how range queries may be satisfied by using the encrypter
Expand Down Expand Up @@ -182,7 +182,7 @@ func (t *EncCC) RangeDecrypter(stub shim.ChaincodeStubInterface, encKey []byte)
return shim.Error(fmt.Sprintf("ent.Decrypt failed, err %s", err))
}

keyvalueset = append(keyvalueset, keyValuePair{el.Key, v})
keyvalueset = append(keyvalueset, keyValuePair{el.Key, string(v)})
}

bytes, err := json.Marshal(keyvalueset)
Expand Down

0 comments on commit 4c59a36

Please sign in to comment.