@yume-chan/adb-credential-web
Advanced tools
Comparing version
@@ -5,2 +5,8 @@ { | ||
{ | ||
"version": "0.0.22", | ||
"tag": "@yume-chan/adb-credential-web_v0.0.22", | ||
"date": "Wed, 13 Dec 2023 05:57:27 GMT", | ||
"comments": {} | ||
}, | ||
{ | ||
"version": "0.0.21", | ||
@@ -7,0 +13,0 @@ "tag": "@yume-chan/adb-credential-web_v0.0.21", |
# Change Log - @yume-chan/adb-credential-web | ||
This log was last generated on Fri, 25 Aug 2023 14:05:18 GMT and should not be manually modified. | ||
This log was last generated on Wed, 13 Dec 2023 05:57:27 GMT and should not be manually modified. | ||
## 0.0.22 | ||
Wed, 13 Dec 2023 05:57:27 GMT | ||
_Version update only_ | ||
## 0.0.21 | ||
@@ -6,0 +11,0 @@ Fri, 25 Aug 2023 14:05:18 GMT |
{ | ||
"name": "@yume-chan/adb-credential-web", | ||
"version": "0.0.21", | ||
"description": "Credential Store for `@yume-chan/adb` using Web LocalStorage API.", | ||
"version": "0.0.22", | ||
"description": "Credential Store for `@yume-chan/adb` using WebCrypto and IndexedDB APIs.", | ||
"keywords": [ | ||
@@ -27,4 +27,4 @@ "adb" | ||
"dependencies": { | ||
"@yume-chan/adb": "^0.0.21", | ||
"tslib": "^2.6.0" | ||
"@yume-chan/adb": "^0.0.22", | ||
"tslib": "^2.6.2" | ||
}, | ||
@@ -34,5 +34,5 @@ "devDependencies": { | ||
"@yume-chan/tsconfig": "^1.0.0", | ||
"eslint": "^8.44.0", | ||
"prettier": "^3.0.0", | ||
"typescript": "^5.1.6" | ||
"eslint": "^8.55.0", | ||
"prettier": "^3.1.0", | ||
"typescript": "^5.3.2" | ||
}, | ||
@@ -39,0 +39,0 @@ "scripts": { |
@@ -1,39 +0,46 @@ | ||
# `@yume-chan/adb-credential-web` | ||
<p align="center"> | ||
<img alt="Tango" src="https://raw.githubusercontent.com/yume-chan/ya-webadb/main/.github/logo.svg" width="200"> | ||
</p> | ||
Generate RSA keys using Web Crypto API ([MDN](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)) and store them in IndexedDB ([MDN](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)). | ||
<h1 align="center">@yume-chan/adb-credential-web</h1> | ||
Local storage is not available in Web Workers (for example WebUSB API is supported in Chrome extension service workers), so IndexedDB is used instead. | ||
<p align="center"> | ||
Credential Store for `@yume-chan/adb` using WebCrypto and IndexedDB APIs. | ||
</p> | ||
- [Constructor](#constructor) | ||
- [`generateKey`](#generatekey) | ||
- [`iterateKeys`](#iteratekeys) | ||
<p align="center"> | ||
<a href="https://github.com/yume-chan/ya-webadb/blob/main/LICENSE"> | ||
<img alt="MIT License" src="https://img.shields.io/github/license/yume-chan/ya-webadb"> | ||
</a> | ||
<a href="https://github.com/yume-chan/ya-webadb/releases"> | ||
<img alt="GitHub release" src="https://img.shields.io/github/v/release/yume-chan/ya-webadb?logo=github"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/@yume-chan/adb"> | ||
<img alt="npm" src="https://img.shields.io/npm/dm/%40yume-chan/adb?logo=npm"> | ||
</a> | ||
<a href="https://discord.gg/26k3ttC2PN"> | ||
<img alt="Discord" src="https://img.shields.io/discord/1120215514732564502?logo=discord&logoColor=%23ffffff&label=Discord"> | ||
</a> | ||
</p> | ||
## Constructor | ||
This package is part of [Tango ADB](https://github.com/yume-chan/ya-webadb). Generally you need multiple packages to build a complete ADB client that can run on Web browsers and Node.js. Read the documentation for more information. | ||
```ts | ||
public constructor(); | ||
``` | ||
## Documentation | ||
Create a new instance of `AdbWebCredentialStore`. | ||
Check the latest documentation at https://tango-adb.github.io/docs/ | ||
## `generateKey` | ||
## Sponsors | ||
```ts | ||
async generateKey(): Promise<Uint8Array> | ||
``` | ||
[Become a backer](https://opencollective.com/ya-webadb) and get your image on our README on Github with a link to your site. | ||
Generate a RSA private key and store it into LocalStorage. | ||
Calling this method multiple times will overwrite the previous key. | ||
The returned `Uint8Array` is the private key in PKCS #8 format. | ||
## `iterateKeys` | ||
```ts | ||
async *iterateKeys(): AsyncGenerator<Uint8Array, void, void> | ||
``` | ||
Yield the stored RSA private key. `AdbWebCredentialStore` only stores one key, so only one value will be yielded. | ||
This method returns a generator, so `for await...of...` loop should be used to read the key. | ||
<a href="https://opencollective.com/ya-webadb/backer/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/0/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/1/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/2/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/3/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/3/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/4/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/4/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/5/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/5/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/6/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/6/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/7/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/7/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/8/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/8/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/9/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/9/avatar.svg?requireActive=false"></a> | ||
<a href="https://opencollective.com/ya-webadb/backer/10/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/10/avatar.svg?requireActive=false"></a> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
49992
7.92%360
1.69%47
17.5%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated