ssh-keygen-wasm
v1.0.11
Published
This module is a small wrapper around Go's ssh library.
Downloads
6
Readme
Go-based WASM module to read, decrypt, generate SSH keys in the browser
This module is a small wrapper around Go's ssh library. It supports decrypting and decoding private keys, re-encoding in PKCS#8 and generating ed25519 and RSA keys.
Compile the wasm module using GOOS=js GOARCH=wasm go build -o ssh-keygen.wasm main.go functions.go
Example usage in typescrypt:
import { generatePrivateKey } from "ssh-keygen-wasm";
// in an async func:
var privateKey = generatePrivateKey("ed25519") // will be returned encoded in PKCS#8, ready for openssh usage
console.log(privateKey)