Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/earthstar/src/crypto/crypto-types.ts>ICryptoDriver

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
interface ICryptoDriver
import { type ICryptoDriver } from "https://deno.land/x/earthstar@v10.0.0-alpha.3/src/crypto/crypto-types.ts";

A crypto driver provides low-level access to an implementation providing ed25519 cryptography, e.g. Chloride, noble/ed25519, Node crypto.

Methods

sha256(input: string | Uint8Array): Promise<Uint8Array>
updatableSha256(): UpdatableHash<any>
generateKeypairBytes(): Promise<KeypairBytes>
sign(keypairBytes: KeypairBytes, msg: string | Uint8Array): Promise<Uint8Array>
verify(
publicKey: Uint8Array,
sig: Uint8Array,
msg: string | Uint8Array,
): Promise<boolean>