initial rough impl

This commit is contained in:
FabianLars
2025-07-24 00:27:59 +02:00
parent a7af1a81b7
commit a132d8f3d5
30 changed files with 497 additions and 154 deletions
+22 -1
View File
@@ -2,4 +2,25 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
export function x() {}
import { invoke } from '@tauri-apps/api/core'
// TODO: functions to delete entries?
export async function setString(key: string, value: string) {
return invoke('plugin:secure-storage|set_string', { key, value })
}
export async function getString(key: string): Promise<string> {
return invoke('plugin:secure-storage|get_string', { key })
}
export async function setBinary(
key: string,
value: number[] | Uint8Array | ArrayBuffer
) {
return invoke('plugin:secure-storage|set_binary', { key, value })
}
export async function getBinary(key: string): Promise<number[]> {
return invoke('plugin:secure-storage|set_string', { key })
}