juliangruber / keypair

Generate a RSA PEM key pair from pure JS
Other
274 stars 51 forks source link

Existence of '\n' characters within the key values #10

Open subodh-dharma opened 8 years ago

subodh-dharma commented 8 years ago

The '\n' printing in the key values makes the key values useless. When doing a POST method with these keys as input, the string treats '\n' as characters rather than new line. Hence when calculating the fingerprints it always give an error.

Kindly look into this issue.

juliangruber commented 8 years ago

What fix do you suggest?

lylethompson commented 7 years ago

You need to use unix line endings for all strings. So either generate it that way, or remove the \r characters from the result before returning it.

BlackFrog1 commented 6 years ago

You need to Base64 encode the key values before POST.