Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Fix utf-8 handling.#46

Merged
alokmenghrajani merged 1 commit intomasterfrom
alok/unicode
Sep 16, 2016
Merged

Fix utf-8 handling.#46
alokmenghrajani merged 1 commit intomasterfrom
alok/unicode

Conversation

@alokmenghrajani
Copy link
Copy Markdown
Contributor

@alokmenghrajani alokmenghrajani commented Sep 15, 2016

Jose spec mentions that the plaintext should be encoded as utf-8 bytes. Javascript by
default uses utf-16, so we need to convert when encrypting/decrypting/signing.

This commit is based on the work by rapropos (see #42).
I prefer to minimize the code size by re-using existing string manipulation functions.

@alokmenghrajani alokmenghrajani mentioned this pull request Sep 15, 2016
Jose spec mentions that the plaintext should be encoded as utf-8 bytes. Javascript by
default uses utf-16, so we need to convert when encrypting/decrypting/signing.

This commit is based on the work by rapropos (see #42).
I prefer to minimize the code size by re-using existing string manipulation functions.
Copy link
Copy Markdown
Contributor

@csstaub csstaub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@csstaub csstaub assigned csstaub and unassigned csstaub Sep 16, 2016
@alokmenghrajani alokmenghrajani merged commit 06725a8 into master Sep 16, 2016
@alokmenghrajani alokmenghrajani deleted the alok/unicode branch September 16, 2016 18:04
@rapropos rapropos mentioned this pull request Sep 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants