Changes between Version 6 and Version 7 of doc/TorMessenger/SASL


Ignore:
Timestamp:
Mar 12, 2017, 1:38:46 AM (3 years ago)
Author:
arlolra
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/TorMessenger/SASL

    v6 v7  
    99crypto.subtle.generateKey({ name: "ECDSA", namedCurve: "P-256" }, true, ["sign"])
    1010.then((kp) => {
     11  let padStart = (s, l, c) => Array(l - s.length + 1).join(c || " ") + s;
    1112  let padEnd = (s, l, c) => s + Array(l - s.length + 1).join(c || " ");
    1213  crypto.subtle.exportKey("jwk", kp.privateKey).then((o) => {
     
    1920    let str = atob(d);
    2021    let a = Array.prototype.map.call(str, (x) => x.charCodeAt(0));
    21     let h = a.reduce((prev, next) => prev + next.toString(16), "");
     22    let h = a.reduce((prev, next) => prev + padStart(next.toString(16), 2, "0"), "");
    2223    console.log(h);
    2324  });