write skeleton of functions

This commit is contained in:
2024-05-14 10:58:00 +02:00
parent cfcb99cd69
commit 710553bfce
11 changed files with 98 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
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"
}
}