Compare commits

..

No commits in common. "master" and "v1.0.1" have entirely different histories.

4 changed files with 4 additions and 7 deletions

View File

@ -27,8 +27,6 @@ so you can use Eckles or Rasha, as mentioned above.
<https://coolaj86.com/demos/ssh-to-jwk/> <https://coolaj86.com/demos/ssh-to-jwk/>
<img border="1" src="https://i.imgur.com/g35NuLP.png" />
```bash ```bash
git clone https://git.coolaj86.com/coolaj86/bluecrypt-ssh-to-jwk.js git clone https://git.coolaj86.com/coolaj86/bluecrypt-ssh-to-jwk.js
pushd bluecrypt-ssh-to-jwk.js/ pushd bluecrypt-ssh-to-jwk.js/

View File

@ -19,8 +19,7 @@
<pre><code class="js-jwk"> </code></pre> <pre><code class="js-jwk"> </code></pre>
<br> <br>
<p>Made with <a href="https://git.coolaj86.com/coolaj86/bluecrypt-ssh-to-jwk.js/">ssh-to-jwk.js</a> (Browser friendly)</p> <p>Made with <a href="https://git.coolaj86.com/coolaj86/bluecrypt-ssh-to-jwk.js/">ssh-to-jwk.js</a></p>
<p>Also available for node.js: <a href="https://git.coolaj86.com/coolaj86/ssh-to-jwk.js/">ssh-to-jwk.js</a></p>
<script src="./ssh-to-jwk.js"></script> <script src="./ssh-to-jwk.js"></script>
<script> <script>

View File

@ -1,6 +1,6 @@
{ {
"name": "bluecrypt-ssh-to-jwk", "name": "bluecrypt-ssh-to-jwk",
"version": "1.0.3", "version": "1.0.1",
"description": "SSH to JWK in < 150 lines of VanillaJS.", "description": "SSH to JWK in < 150 lines of VanillaJS.",
"homepage": "https://git.coolaj86.com/coolaj86/bluecrypt-ssh-to-jwk.js", "homepage": "https://git.coolaj86.com/coolaj86/bluecrypt-ssh-to-jwk.js",
"main": "ssh-to-jwk.js", "main": "ssh-to-jwk.js",

View File

@ -94,8 +94,8 @@ SSH.parsePublicKey = function (ssh) {
var y = els[2].slice(1 + len, 1 + len + len); var y = els[2].slice(1 + len, 1 + len + len);
// I don't think EC keys use 0x00 padding, but just in case // I don't think EC keys use 0x00 padding, but just in case
while (0x00 === x[0]) { x = x.slice(1); } if (0x00 === x[0]) { x = x.slice(1); }
while (0x00 === y[0]) { y = y.slice(1); } if (0x00 === y[0]) { y = y.slice(1); }
ssh.jwk.x = Enc.bufToUrlBase64(x); ssh.jwk.x = Enc.bufToUrlBase64(x);
ssh.jwk.y = Enc.bufToUrlBase64(y); ssh.jwk.y = Enc.bufToUrlBase64(y);