Skip to content

Commit c19b8ee

Browse files
committed
chore: release v0.1.0
1 parent 1cfbf0a commit c19b8ee

File tree

13 files changed

+62
-75
lines changed

13 files changed

+62
-75
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [0.1.0](https://github.com/ayZagen/secure-cookie/compare/v0.0.7...v0.1.0) (2021-09-23)
2+
3+
4+
### Features
5+
6+
* allow empty keystore constructor params ([1cfbf0a](https://github.com/ayZagen/secure-cookie/commit/1cfbf0a5ad5d85f4a81d290340cfc0efdb28beb8))
7+
18
## [0.0.7](https://github.com/ayZagen/secure-cookie/compare/v0.0.6...v0.0.7) (2021-09-21)
29

310

dist/index.cjs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* secure-cookie v0.0.7
2+
* secure-cookie v0.1.0
33
* (c) Ismail H. Ayaz
44
* Released under the MIT License.
55
*/
@@ -167,22 +167,17 @@ var AUTH_TAG_REQUIRED = /-(gcm|ccm)/;
167167
var KeyStore = /** @class */ (function () {
168168
function KeyStore(opts) {
169169
opts = opts || {};
170-
if (opts.encryption) {
171-
if (!Array.isArray(opts.encryption.keys) || opts.encryption.keys.length === 0) {
172-
throw new Error("keys are required for encryption");
173-
}
174-
}
175-
if (opts.signing) {
176-
if (!Array.isArray(opts.signing.keys) || opts.signing.keys.length === 0) {
177-
throw new Error("keys are required for signing");
178-
}
179-
}
180170
this.encryption = Object.assign({
181171
algorithm: 'aes-192-ccm',
182172
authTagLength: 16,
183-
encoding: 'hex', keys: []
173+
encoding: 'hex',
174+
keys: []
184175
}, opts.encryption || {});
185-
this.signing = Object.assign({ encoding: 'base64', algorithm: 'sha1', keys: [] }, opts.signing || {});
176+
this.signing = Object.assign({
177+
encoding: 'base64',
178+
algorithm: 'sha1',
179+
keys: []
180+
}, opts.signing || {});
186181
}
187182
KeyStore.prototype.encrypt = function (data, options) {
188183
if (!data) {

dist/index.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.esm.js

Lines changed: 8 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 8 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.mjs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* secure-cookie v0.0.7
2+
* secure-cookie v0.1.0
33
* (c) Ismail H. Ayaz
44
* Released under the MIT License.
55
*/
@@ -157,22 +157,17 @@ var AUTH_TAG_REQUIRED = /-(gcm|ccm)/;
157157
var KeyStore = /** @class */ (function () {
158158
function KeyStore(opts) {
159159
opts = opts || {};
160-
if (opts.encryption) {
161-
if (!Array.isArray(opts.encryption.keys) || opts.encryption.keys.length === 0) {
162-
throw new Error("keys are required for encryption");
163-
}
164-
}
165-
if (opts.signing) {
166-
if (!Array.isArray(opts.signing.keys) || opts.signing.keys.length === 0) {
167-
throw new Error("keys are required for signing");
168-
}
169-
}
170160
this.encryption = Object.assign({
171161
algorithm: 'aes-192-ccm',
172162
authTagLength: 16,
173-
encoding: 'hex', keys: []
163+
encoding: 'hex',
164+
keys: []
174165
}, opts.encryption || {});
175-
this.signing = Object.assign({ encoding: 'base64', algorithm: 'sha1', keys: [] }, opts.signing || {});
166+
this.signing = Object.assign({
167+
encoding: 'base64',
168+
algorithm: 'sha1',
169+
keys: []
170+
}, opts.signing || {});
176171
}
177172
KeyStore.prototype.encrypt = function (data, options) {
178173
if (!data) {

dist/index.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ secure-cookie
3232

3333
#### Defined in
3434

35-
[cookies.ts:8](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L8)
35+
[cookies.ts:8](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L8)
3636

3737
___
3838

@@ -42,7 +42,7 @@ ___
4242

4343
#### Defined in
4444

45-
[cookies.ts:39](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L39)
45+
[cookies.ts:39](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L39)
4646

4747
___
4848

@@ -52,4 +52,4 @@ ___
5252

5353
#### Defined in
5454

55-
[cookies.ts:38](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L38)
55+
[cookies.ts:38](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L38)

0 commit comments

Comments
 (0)