Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

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

Higher-level crypto functions. Not used directly for the most part, but useful for generating new keypairs.

Methods

sha256base32(input: string | Uint8Array): Promise<Base32String>
updatableSha256(): UpdatableHash<any>
generateAuthorKeypair(name: string): Promise<AuthorKeypair | ValidationError>
sign(keypair: AuthorKeypair, msg: string | Uint8Array): Promise<Base32String | ValidationError>
verify(
authorAddress: AuthorAddress,
msg: string | Uint8Array,
): Promise<boolean>
checkAuthorKeypairIsValid(keypair: AuthorKeypair): Promise<true | ValidationError>