Closed imaNNeo closed 4 years ago
Good feedback. You probably want to use SealedBox.sealBytesOpen, and decode the resulting bytes yourself. The SealedBox seal and sealOpen use utf8 encoding by design. I'm aware that the API isn't super clear, SealedBox.sealOpenUtf8 might be a better name.
Thanks for your response. SealedBox.sealBytesOpen solved the problem. Great work!
Hi, we've tried to use
SealedBox.sealOpen(cipher, keyPair)
, but Unfortunately we faced an exception. I checked the implementation and I realized you are forcing it to decode as UTF-8, and I think as we working with keys, and there are no special characters, and it is okay to decode it as ASCII. I had to copy your code and change it to solve my issue. UTF-8 decode should be optional. Thanks