Browse Source

add underscore to internal method name

ameba23 3 years ago
parent
commit
17b09468c5
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      index.js

+ 2
- 2
index.js View File

@@ -62,7 +62,7 @@ class Crypto {
62 62
 
63 63
     assert(can, 'cobox-crypto: key must be a buffer of length ' + sodium.crypto_secretbox_KEYBYTES)
64 64
 
65
-    opts.valueEncoding = this.resolveStringEncoder(opts.valueEncoding)
65
+    opts.valueEncoding = this._resolveStringEncoder(opts.valueEncoding)
66 66
 
67 67
     return {
68 68
       encode (message, buffer, offset) {
@@ -96,7 +96,7 @@ class Crypto {
96 96
     }
97 97
   }
98 98
 
99
-  resolveStringEncoder (encoder) {
99
+  _resolveStringEncoder (encoder) {
100 100
     if (encoder === 'json') return {
101 101
       encode: (msg) => Buffer.from(JSON.stringify(msg)),
102 102
       decode: (msg) => JSON.parse(msg.toString())