Skip to content

Commit

Permalink
fixed softvar#22, softvar#15, added optimized linting, fixed readme f…
Browse files Browse the repository at this point in the history
…or encryptionNamespace
  • Loading branch information
konsultaner committed Jan 18, 2019
1 parent c362ebf commit 07e0f5b
Show file tree
Hide file tree
Showing 13 changed files with 2,176 additions and 2,390 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,16 @@ encoding method is choosen.
`encryptionNamespace` is used to make multiple instances with different `encryptionSecret`
and/or different `encryptionSecret` possible.

var ls1 = new SecureLS({encodingType: 'des', encryptionSecret: 'my-secret-key-1'});
var ls2 = new SecureLS({encodingType: 'aes', encryptionSecret: 'my-secret-key-2'});
var ls1 = new SecureLS({
encodingType: 'des',

This comment has been minimized.

Copy link
@jas-

jas- Jan 18, 2019

You should be using AES, the speed up from DES shouldn’t negate use of strong ciphers

encryptionSecret: 'my-secret-key-1',

This comment has been minimized.

Copy link
@jas-

jas- Jan 18, 2019

This should not, I repeat absolutely NOT be a static value. Either generate a unique per browser fingerprint or force a user supplied value with which to seed your KDF.

This comment has been minimized.

Copy link
@konsultaner

konsultaner Jan 20, 2019

Author Owner

@jas- You are absolutly right, but this is only an example in the readme.md to demonstrate how to use two instances in parallel.

encryptionNamespace: 'user-1'
});
var ls2 = new SecureLS({
encodingType: 'aes',
encryptionSecret: 'my-secret-key-2',
encryptionNamespace: 'user-2'
});

**Examples:**

Expand Down
Loading

1 comment on commit 07e0f5b

@jas-
Copy link

@jas- jas- commented on 07e0f5b Jan 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the code comments for more information

Please sign in to comment.