News for hackers. Stuff that matters.
Re:FileKit: An open source end-to-end encrypted cloud storag... by goliatone on Thursday August 29, 2019 @08:26PM (#20834949)
Re #2 There’s this [1] tc39 proposal.

You could also hack a solution using dynamic method names and Symbols.

[1] https://github.com/tc39/proposal-private-methods/blob/master...

Re:FileKit: An open source end-to-end encrypted cloud storag... by csande17 on Thursday August 29, 2019 @11:15PM (#20835693)
I don't think the private methods proposal will help with cryptography at all. The "security" it provides boils down to making it difficult for code outside the class to access the value, like you can already do with closures like this:

    function makeCounter() {
      var x = 0;
      return function() { return ++x; };
    }
It doesn't help at all with side-channel attacks, which are the main reason why it's hard to safely perform cryptographic operations in a just-in-time interpreted language like JavaScript. It also doesn't stop rogue scripts on the same page from pulling the user's passwords/keys right out of the password field, URL bar, localStorage, or wherever else your script gets them from.