-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full nacl implementation #2
Conversation
for (let i = 0; i < data.length; i++) { | ||
encoded.push(String.fromCharCode(data[i])); | ||
} | ||
return encoded.join(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like decode/encode latin never used in glow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. But I would keep it for now, there are more classes to move from Coffeescript Glow. If we still don't need them, I'll remove these methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't forget
const newTimeoutId = window.setTimeout(() => { | ||
this.guestKeys.delete(guestTag); | ||
this.guestKeyTimeouts.delete(guestTag); | ||
}, config.RELAY_SESSION_TIMEOUT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again reyking should not depend on relays
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's decide in the next PR about Mailbox and Relay classes, here I simply took the implementation for the old Glow. Maybe I'll move this stuff to Relay class, or maybe we don't need it at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget
} | ||
return encoded.join(''); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think encode and decode latint here is outdated, please see https://stackoverflow.com/questions/8936984/uint8array-to-string-in-javascript
also we havbe similar methods in nacl one of them we need to remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextEncoder
and TextDecoder
don't work in jsdom
environment, so all tests will fail. But let me think of this in the next PR, maybe I'll find a solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
if (!this.driverInstance) { | ||
// fallback to the default JS driver | ||
this.driverInstance = driver || new JsNaClDriver(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please throw an error if already was set. Developer should know if he doing something wrong
No description provided.