node-forge 0.8.1 → 0.8.5

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/CHANGELOG.md CHANGED
@@ -1,6 +1,29 @@
1
1
  Forge ChangeLog
2
2
  ===============
3
3
 
4
+ ## 0.8.5 - 2019-06-18
5
+
6
+ ### Fixed
7
+ - Remove use of `const`.
8
+
9
+ ## 0.8.4 - 2019-05-22
10
+
11
+ ### Changed
12
+ - Replace all instances of Node.js `new Buffer` with `Buffer.from` and `Buffer.alloc`.
13
+
14
+ ## 0.8.3 - 2019-05-15
15
+
16
+ ### Fixed
17
+ - Use basic character set for code.
18
+
19
+ ## 0.8.2 - 2019-03-18
20
+
21
+ ### Fixed
22
+ - Fix tag calculation when continuing an AES-GCM block.
23
+
24
+ ### Changed
25
+ - Switch to eslint.
26
+
4
27
  ## 0.8.1 - 2019-02-23
5
28
 
6
29
  ### Fixed
package/README.md CHANGED
@@ -904,7 +904,7 @@ var signature = ED25519.sign({
904
904
  // sign a message passed as a buffer
905
905
  var signature = ED25519.sign({
906
906
  // also accepts a forge ByteBuffer or Uint8Array
907
- message: new Buffer('test', 'utf8'),
907
+ message: Buffer.from('test', 'utf8'),
908
908
  privateKey: privateKey
909
909
  });
910
910
 
@@ -930,7 +930,7 @@ var verified = ED25519.verify({
930
930
  // sign a message passed as a buffer
931
931
  var verified = ED25519.verify({
932
932
  // also accepts a forge ByteBuffer or Uint8Array
933
- message: new Buffer('test', 'utf8'),
933
+ message: Buffer.from('test', 'utf8'),
934
934
  // node.js Buffer, Uint8Array, forge ByteBuffer, or binary string
935
935
  signature: signature,
936
936
  // node.js Buffer, Uint8Array, forge ByteBuffer, or binary string
@@ -1961,11 +1961,11 @@ bytes.getBytes(/* count */);
1961
1961
  // convert a forge buffer into a Node.js Buffer
1962
1962
  // make sure you specify the encoding as 'binary'
1963
1963
  var forgeBuffer = forge.util.createBuffer();
1964
- var nodeBuffer = new Buffer(forgeBuffer.getBytes(), 'binary');
1964
+ var nodeBuffer = Buffer.from(forgeBuffer.getBytes(), 'binary');
1965
1965
 
1966
1966
  // convert a Node.js Buffer into a forge buffer
1967
1967
  // make sure you specify the encoding as 'binary'
1968
- var nodeBuffer = new Buffer();
1968
+ var nodeBuffer = Buffer.from('CAFE', 'hex');
1969
1969
  var forgeBuffer = forge.util.createBuffer(nodeBuffer.toString('binary'));
1970
1970
 
1971
1971
  // parse a URL