@otplib/core 13.2.0 → 13.2.1

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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -54,9 +54,9 @@ The `CryptoContext` class provides a unified interface for crypto operations:
54
54
 
55
55
  ```typescript
56
56
  import { createCryptoContext } from "@otplib/core";
57
- import { NodeCryptoPlugin } from "@otplib/plugin-crypto-node";
57
+ import { crypto as plugin } from "@otplib/plugin-crypto-node";
58
58
 
59
- const crypto = createCryptoContext(new NodeCryptoPlugin());
59
+ const crypto = createCryptoContext(plugin);
60
60
 
61
61
  // Async HMAC computation
62
62
  const digest = await crypto.hmac("sha1", key, data);
@@ -74,9 +74,9 @@ The `Base32Context` class provides a unified interface for Base32 operations:
74
74
 
75
75
  ```typescript
76
76
  import { createBase32Context } from "@otplib/core";
77
- import { ScureBase32Plugin } from "@otplib/plugin-base32-scure";
77
+ import { base32 as plugin } from "@otplib/plugin-base32-scure";
78
78
 
79
- const base32 = createBase32Context(new ScureBase32Plugin());
79
+ const base32 = createBase32Context(plugin);
80
80
 
81
81
  // Encode binary data to Base32
82
82
  const encoded = base32.encode(new Uint8Array([1, 2, 3]), { padding: false });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otplib/core",
3
- "version": "13.2.0",
3
+ "version": "13.2.1",
4
4
  "description": "Core interfaces, types, and crypto abstraction for otplib",
5
5
  "license": "MIT",
6
6
  "author": "Gerald Yeo <support@yeojz.dev>",