Reading keyset using javascript
Hi,
I was playing around with tink-crypto from npm for javascript and i wanted to do something like
KeysetHandle.readNoSecret(JsonKeysetReader.withString(json)).getPrimitive(HybridEncrypt). I have the required json object but I wasn't able to find the javascript version of the JsonKeysetReader. What would be the best alternative for my use case?
Thanks
We don't currently offer JSON-based keysets in JavaScript because the underlying JavaScript protobuf implementation doesn't support JSON serialization. A feature request for this could be opened, but it's a bit complicated because it raises questions about the relationship between Tink and protobuf in JavaScript (which is already the source of a lot of friction).
Where are you getting json from? Would it work to have that system give you the keyset in binary protobuf format instead? That's the only format currently supported by Tink in JS.
As the above comment remains unanswered, I will close this.