Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Sodium.crypto_auth(c,k).then((aa) => {
this.setState({crypto_auth:(a === aa)})
Sodium.crypto_auth_verify(a,c,k)
.then((r) => this.setState({crypto_auth_verify:(r == 0)}))
.catch((error) => {
this.setState({crypto_auth_verify:false})
this._handleError(error)
})
}).catch((error) => {
this.setState({crypto_auth_verify:false})