@bedrock/record-cipher 1.0.0 → 1.0.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.
@@ -169,14 +169,16 @@ export class RecordCipher {
169
169
 
170
170
  /**
171
171
  * Creates a `RecordCipher` instance for encrypting and/or decrypting
172
- * record `secrets`. The default encoding mode for the `secrets` is `cbor`,
173
- * which supports any binary subfields present in `secrets`. The encoding
174
- * can alternatively be set to `json` for backwards compatiblity with
175
- * modules that previously encoded using JSON, not CBOR.
172
+ * record `secrets` (usually secret "keys" of some sort). The default
173
+ * encoding mode for the `secrets` is `cbor`, which supports any binary
174
+ * subfields present in `secrets`. The encoding can alternatively be set to
175
+ * `json` for backwards compatiblity with modules that previously encoded
176
+ * using JSON, not CBOR.
176
177
  *
177
178
  * @param {object} options - The options to use.
178
- * @param {string} [options.currentKekId] - The ID of the KEK to use for
179
- * new encryptions; may be set to `null` to disable encryption; if not
179
+ * @param {string} [options.currentKekId] - The ID of the KEK (Key Encryption
180
+ * Key, i.e., a key used to encrypt secrets, usually other "keys") to use
181
+ * for new encryptions; may be set to `null` to disable encryption; if not
180
182
  * set, it will be automatically set to the first KEK ID in the `keks`
181
183
  * array if it is not empty (otherwise it will be set to `null`).
182
184
  * @param {Array} [options.keks=[]] - An array of objects, each with an `id`
@@ -193,7 +195,7 @@ export class RecordCipher {
193
195
  */
194
196
  static async create({currentKekId, keks = [], encoding = 'cbor'} = {}) {
195
197
  if(!(currentKekId === undefined || currentKekId === null ||
196
- typeof currentKekId !== 'string')) {
198
+ typeof currentKekId === 'string')) {
197
199
  throw new TypeError('"currentKekId" must be a string or null.');
198
200
  }
199
201
  if(!Array.isArray(keks)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrock/record-cipher",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "Bedrock Record Cipher",
6
6
  "license": "SEE LICENSE IN LICENSE.md",