Skip to content

Commit

Permalink
Merge "[FAB-6439]test Range func returning decrypted vals"
Browse files Browse the repository at this point in the history
  • Loading branch information
mastersingh24 authored and Gerrit Code Review committed Oct 24, 2017
2 parents e9fb0be + 4c59a36 commit 1e876e3
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 1e876e3

Please sign in to comment.