interledger-deprecated / java-crypto-conditions

WE'VE MOVED: This project has moved to Hyperledger Quilt
https://github.com/hyperledger/quilt/tree/master/crypto-conditions
Apache License 2.0
5 stars 12 forks source link

Serializing Fulfillment #65

Closed ManujSubhankar closed 7 years ago

ManujSubhankar commented 7 years ago

Ed25519Sha256Fulfillment doesn't implement Serializable. How can we write Ed25519Sha256Fulfillment object into a file and read it back. There is an getEncoded() function. But how to decode?

sappenin commented 7 years ago

Hi @ManujSubhankar, the getEncoded() function will return a byte[] (array of bytes). If you want to read these bytes, you can use CryptoConditionReader.readFulfillment() to reverse the process.