Crypto storage for private
, public
and secret
keys keeping. Extends CryptoStorage.
interface CryptoKeyStorage extends CryptoStorage<CryptoKey> {
getItem(index: string): Promise<CryptoKey>;
getItem(index: string, algorithm: ImportAlgorithms, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
}
Returns CryptoKey from key storage.
Key getting with default params
const key = await crypto.keyStorage.getItem("0001");
Key getting with import params
const key = await crypto.keyStorage.getItem("0001", {name: "RSASSA-PKCS1-v1_5", hash: "SHA-256"}, false, ["sign"]);