@otplib/plugin-crypto-web 13.0.1 → 13.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -13
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -75,19 +75,9 @@ const digest = await crypto.hmac("SHA-1", key, data);
|
|
|
75
75
|
const bytes = await crypto.randomBytes(20);
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
## Browser Compatibility
|
|
79
|
-
|
|
80
|
-
| Browser | SHA-1 | SHA-256 | SHA-512 |
|
|
81
|
-
| ----------- | ----- | ------- | ------- |
|
|
82
|
-
| Chrome 37+ | Yes | Yes | Yes |
|
|
83
|
-
| Firefox 34+ | Yes | Yes | Yes |
|
|
84
|
-
| Safari 7+ | Yes | Yes | Yes |
|
|
85
|
-
| Edge 79+ | Yes | Yes | Yes |
|
|
86
|
-
| IE 11 | No | No | No |
|
|
87
|
-
|
|
88
78
|
## Edge Runtime Support
|
|
89
79
|
|
|
90
|
-
|
|
80
|
+
Should also work in runtimes which implements Web Crypto API:
|
|
91
81
|
|
|
92
82
|
```typescript
|
|
93
83
|
// Cloudflare Worker example
|
|
@@ -105,8 +95,8 @@ export default {
|
|
|
105
95
|
|
|
106
96
|
Use this plugin when:
|
|
107
97
|
|
|
108
|
-
- Running in browsers (Chrome, Firefox, Safari, Edge)
|
|
109
|
-
- Using edge runtimes (Cloudflare Workers, Vercel Edge)
|
|
98
|
+
- Running in browsers (eg: Chrome, Firefox, Safari, Edge)
|
|
99
|
+
- Using edge runtimes (eg: Cloudflare Workers, Vercel Edge Functions)
|
|
110
100
|
- Building web applications with React, Vue, etc.
|
|
111
101
|
- Need cross-platform crypto support
|
|
112
102
|
- Want modern browser-native crypto (no external dependencies)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/index.ts":{"bytes":3702,"imports":[{"path":"@otplib/core","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5210},"dist/index.cjs":{"imports":[{"path":"@otplib/core","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":889}},"bytes":1360}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/index.ts":{"bytes":3702,"imports":[{"path":"@otplib/core","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":5074},"dist/index.js":{"imports":[{"path":"@otplib/core","kind":"import-statement","external":true}],"exports":["WebCryptoPlugin","crypto","default"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":806}},"bytes":861}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@otplib/plugin-crypto-web",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
4
4
|
"description": "Web Crypto API adapter for otplib",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Gerald Yeo <support@yeojz.dev>",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"LICENSE"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@otplib/core": "13.0.
|
|
47
|
+
"@otplib/core": "13.0.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"tsup": "^8.0.1",
|