Using bccsp instance from chaincode

+1 vote
It is my understanding that in Hyperledger Fabric v1.0 we could use the BCCSP capabilities within the chaincode to help applications handle their own encryption. My questions are, is this assumption correct? If so, how can I get a handle of the BCCSP instance from the chaincode?
Oct 22, 2018 in Blockchain by sabby
• 4,350 points
77 views

1 answer to this question.

0 votes

You can take a look at this code snippet. However - note that keeping state in the chaincode is generally not a good idea and it is advised not to store state that is reused across chaincode invocations.

In the future there might be a built-in crypto library to be used by the chaincode developers.

It's also possible to just use the encryption in Go's crypto libraries as well

answered Oct 22, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 17,010 points
693 views
+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Hyperledger Fabric query system chaincode using node SDK

The Fabric Node SDK actually provides a ...READ MORE

answered Nov 9, 2018 in Blockchain by Christine
• 15,790 points
147 views
+1 vote
1 answer

Unable to send payment using API. Please help.

Firstly, check your passwords, your API code and your wallet ...READ MORE

answered Apr 3, 2018 in Blockchain by Christine
• 15,790 points
109 views