24 lines
493 B
TypeScript
24 lines
493 B
TypeScript
import type {Result} from 'result'
|
|
|
|
export type Key = void
|
|
|
|
export class SecretBox<T> {
|
|
public static gen_key() : Key {
|
|
throw "todo"
|
|
}
|
|
|
|
public static encrypt<T>(key: Key, data: Uint8Array) : SecretBox<T> {
|
|
throw "todo"
|
|
}
|
|
public decrypt(key: Key) : Result<Uint8Array> {
|
|
throw "todo"
|
|
}
|
|
|
|
public toString() : string {
|
|
throw "todo"
|
|
}
|
|
public static fromString<T>(data: string) : Result<SecretBox<T>> {
|
|
throw "todo"
|
|
}
|
|
}
|