Android/iOS StrongBox/Secure Enclave Bindings+Wrapper for Tauri.
npm install @auvo/tauri-plugin-crypto-hw-apiThis project is a Tauri plugin which allows for hardware KeyStore (Secure Enclave (iOS) & StrongBox (Android)) control and management on iOS and Android devices with a consistent API.
| Platform | Supported |
| -------- | --------- |
| Linux | x |
| Windows | x |
| macOS | x |
| Android | ✓ |
| iOS | ✓ |
``ts`
import { generate } from "tauri-plugin-crypt-api";
async function generate() {
generate("default")
.then((returnValue) => {
genRes = returnValue;
})
.catch((error) => {
genRes = error;
});
}
`ts`
import { exists } from "tauri-plugin-crypt-api";
async function exists() {
exists("default")
.then((returnValue) => {
genRes = returnValue;
})
.catch((error) => {
genRes = error;
});
}
`ts`
import { getPublicKey } from "tauri-plugin-crypt-api";
async function getPublicKey() {
getPublicKey("default")
.then((returnValue) => {
genRes = returnValue;
})
.catch((error) => {
genRes = error;
});
}
`ts`
import { signPayload } from "tauri-plugin-crypt-api";
async function signPayload() {
signPayload("default")
.then((returnValue) => {
genRes = returnValue;
})
.catch((error) => {
genRes = error;
});
}
`ts`
import { verifySignature } from "tauri-plugin-crypt-api";
async function verifySignature() {
verifySignature("default")
.then((returnValue) => {
genRes = returnValue;
})
.catch((error) => {
genRes = error;
});
}
This permission set configures which
crypto features are by default exposed.
##### Granted Permissions
It allows access to all crypto commands.
##### This default permission set includes the following:
- allow-generateallow-exists
- allow-get-public-key
- allow-sign-payload
- allow-verify-signature
-
| Identifier | Description |
|---|---|
crypto:allow-exists | Enables the exists command without any pre-configured scope. |
crypto:deny-exists | Denies the exists command without any pre-configured scope. |
crypto:allow-generate | Enables the generate command without any pre-configured scope. |
crypto:deny-generate | Denies the generate command without any pre-configured scope. |
crypto:allow-get-public-key | Enables the get_public_key command without any pre-configured scope. |
crypto:deny-get-public-key | Denies the get_public_key command without any pre-configured scope. |
crypto:allow-ping | Enables the ping command without any pre-configured scope. |
crypto:deny-ping | Denies the ping command without any pre-configured scope. |
crypto:allow-sign-payload | Enables the sign_payload command without any pre-configured scope. |
crypto:deny-sign-payload | Denies the sign_payload command without any pre-configured scope. |
crypto:allow-verify-signature | Enables the verify_signature command without any pre-configured scope. |
crypto:deny-verify-signature` | Denies the verify_signature command without any pre-configured scope. |