Skip to content

sshFingerprintSha256 ​

sshFingerprintSha256 ​

The SHA256: fingerprint ssh-keygen -l -E sha256 prints for a key.

It is the SHA-256 digest of the SSH public-key blob (RFC 4253 §6.6 layout), base64-encoded without padding and prefixed with SHA256:. It differs from a certificate fingerprint and from a digest of the SPKI encoding. Pass a public or private CryptoKey, or the raw blob bytes (the decoded base64 field of a public-key line). A private key must be extractable.

ts
function sshFingerprintSha256(
	key: CryptoKey | Uint8Array,
): Promise<string>

Parameters

  • key: CryptoKey | Uint8Array

Throws

Released under the MIT License.