SSH Fingerprint in < 150 lines of VanillaJS, part of the Bluecrypt suite for Browser Crypto.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
AJ ONeal efa8a5d68f fix link il y a 5 ans
README.md fix link il y a 5 ans
index.html simplify il y a 5 ans
package.json v1.0.1: add screenshot il y a 5 ans
screenshot.png v1.0.0: generate ssh-keygen compatible fingerprints il y a 5 ans
ssh-fingerprint.js v1.0.0: generate ssh-keygen compatible fingerprints il y a 5 ans

README.md

Bluecrypt SSH Fingerprint (for Browsers)

A minimal library to read an SSH public key (id_rsa.pub) and generate its fingerprint.

Works for RSA and ECDSA public keys.

Features

< 150 lines of code | 1.1kb gzipped | 2.4kb minified | 4.1kb with comments

  • SSH Public Key SHA256 Fingerprints
    • RSA (2048-bit, 3072-bit, 4096-bit)
    • EC / ECDSA
      • P-256 (prime256v1, secp256r1)
      • P-384 (secp384r1)
  • Node.js version

Need SSH Private Keys?

SSH private keys (id_rsa) are just normal PEM files, so you can use Eckles or Rasha, as mentioned above.

Web Demo

https://coolaj86.com/demos/ssh-fingerprint/

git clone https://git.coolaj86.com/coolaj86/bluecrypt-ssh-fingerprint.js
pushd bluecrypt-ssh-fingerprint.js/
open index.html

Install

You can use it as a plain-old javascript library:

<script src="https://git.coolaj86.com/coolaj86/bluecrypt-ssh-fingerprint.js/raw/branch/master/ssh-fingerprint.js"></script>

It's also on npm:

npm install bluecrypt-ssh-fingerprint

Usage

Very simple:

var pub = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCba21UHE+VbDTpmYYFZUOV+OQ8AngOCdjROsPC0KiEfMvEaEM3NQl58u6QL7G7QsErKViiNPm9OTFo6HF5JijfWzK7haHFuRMEsgI4VwIYyhvqlJDfw/wt0AiVvSmoMfEQn1p1aiaO4V/RJSE3Vw/uz2bxiT22uSkSqOyShyfYE6dMHnuoBkzr4jvSifT+INmbv6Nyo4+AAMCZtYeHLrsFeSTjLL9jMPjI4ZkVdlw2n3Xn9NbltF3/8Ao8dQfElqw+LIQWqU0oFHYNIP4ttfl5ObMKHaKSvBMyNruZR0El/ZsrcHLkAHRCLj07KRQJ81l5CUTPtQ02P1Eamz/nT4I3 rsa@localhost';

SSH.fingerprint({ pub: pub }).then(function (fing) {
  console.info('The key fingerprint is:');
  console.info(fing.fingerprint);
});

Other Tools in the Bluecrypt Suite

Legal

ssh-fingerprint.js | MPL-2.0 | Terms of Use | Privacy Policy

Bluecrypt™ is owned by AJ ONeal