Skip to content

Commit

Permalink
Change from 4 words to 8 words validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kronolynx committed Aug 23, 2016
1 parent 0bb16dc commit 0ca8568
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 2 additions & 6 deletions src/Setup.iced
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class Configure
@localStorage.setItem 'watcher_pub_key', watcher_pub_key
@localStorage.setItem 'vault', answers.vault



# test
await new Crypto watcher_priv_key, null, defer cryptoBox
watcherFP = cryptoBox.watcherKey.get_pgp_fingerprint().toString('hex')

Expand All @@ -66,7 +63,7 @@ class Configure

@done = true
@alert "Now install Trailbot Client in your computer and start the setup wizard." , true
@alert "Then you will be required to enter these 4 words:"
@alert "The following 8 words will be required by the Trailbot Client:"
@alert "#{sentence}".cyan.bold, true

await new Vault this, answers.vault, watcherFP, defer vault
Expand All @@ -77,7 +74,6 @@ class Configure
process.exit 0 unless change
if change && change.client
@localStorage.setItem 'client_pub_key', change.client
console.log "remove id",change.id
vault.remove 'exchange', [change], (res) =>
console.log "file deleted"

Expand Down Expand Up @@ -105,7 +101,7 @@ class Configure

generateChannel : () =>
word = Math.random().toString(36).substring(2)
crypto.createHash('md5').update(word).digest("hex").substr(0, 8)
crypto.createHash('md5').update(word).digest("hex").substr(0, 16)

getExpirationDate : () =>
now = new Date()
Expand Down
7 changes: 3 additions & 4 deletions src/Vault.iced
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ class Vault
else
'anonymous'

save : (col, object, cb) ->
save : (col, object) ->
console.log "Saving into #{col}" if @app.emit
console.log 'SAVING', object if @app.emit
this[col]?.store object
cb and cb true

replace : (col, object) ->
console.log "Replacing into #{col}"
console.log "Replacing into #{col}" if @app.emit
this[col]?.replace object

get : (col, query, cb) ->
Expand All @@ -56,7 +55,7 @@ class Vault
this[col]?.find(query).watch().subscribe(cb, err)

remove : (col, ids) ->
console.log "Removing from #{col}"
console.log "Removing from #{col}" if @app.emit
this[col].removeAll(ids)


Expand Down

0 comments on commit 0ca8568

Please sign in to comment.