|
|
@ -1585,10 +1585,10 @@ define([
|
|
|
|
// XXX maybe use something else than channel?
|
|
|
|
// XXX maybe use something else than channel?
|
|
|
|
var hash = Nacl.hash(Nacl.util.decodeUTF8(channel));
|
|
|
|
var hash = Nacl.hash(Nacl.util.decodeUTF8(channel));
|
|
|
|
var seed = hash.slice(0,32);
|
|
|
|
var seed = hash.slice(0,32);
|
|
|
|
var channel = Util.uint8ArrayToHex(hash.slice(32,48));
|
|
|
|
var mailboxChannel = Util.uint8ArrayToHex(hash.slice(32,48));
|
|
|
|
var curvePair = Nacl.box.keyPair.fromSecretKey(seed);
|
|
|
|
var curvePair = Nacl.box.keyPair.fromSecretKey(seed);
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
channel: channel,
|
|
|
|
channel: mailboxChannel,
|
|
|
|
viewed: [],
|
|
|
|
viewed: [],
|
|
|
|
keys: {
|
|
|
|
keys: {
|
|
|
|
curvePrivate: Nacl.util.encodeBase64(curvePair.secretKey),
|
|
|
|
curvePrivate: Nacl.util.encodeBase64(curvePair.secretKey),
|
|
|
|