@zkorum/capacitor-secure-signing
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

@zkorum/capacitor-secure-signing

Generate signing keys and use them securely.

WARNING: beta software. Only tailored for ZKorum's need for now. At this stage, API and core functionalities WILL change and WILL NOT be backward compatible.

Install

npm install @zkorum/capacitor-secure-signing
npx cap sync

API

doesKeyPairExist(...)

doesKeyPairExist(options: { prefixedKey: string; }) => Promise<{ isExisting: boolean; }>
Param Type
options { prefixedKey: string; }

Returns: Promise<{ isExisting: boolean; }>


generateKeyPair(...)

generateKeyPair(options: { prefixedKey: string; }) => Promise<{ publicKey: string; }>
Param Type
options { prefixedKey: string; }

Returns: Promise<{ publicKey: string; }>


sign(...)

sign(options: { prefixedKey: string; data: string; }) => Promise<{ signature: string; }>
Param Type
options { prefixedKey: string; data: string; }

Returns: Promise<{ signature: string; }>


createKeyPairIfDoesNotExist(...)

createKeyPairIfDoesNotExist(options: { prefixedKey: string; }) => Promise<{ publicKey: string; }>
Param Type
options { prefixedKey: string; }

Returns: Promise<{ publicKey: string; }>


TODO

  • iOS support
  • more options for keys / security

License

This repository is released under LICENSE.

Certain parts of code are inspired or copied from https://github.com/aparajita/capacitor-secure-storage which is MIT Licensed. Those parts are indicated in the code as comments.

Readme

Keywords

Package Sidebar

Install

npm i @zkorum/capacitor-secure-signing

Weekly Downloads

2

Version

1.2.1

License

BSD-2-Clause-Patent

Unpacked Size

58.6 kB

Total Files

28

Last publish

Collaborators

  • nicobao