How to use the react-native-sodium.crypto_auth_verify function in react-native-sodium

To help you get started, we’ve selected a few react-native-sodium examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lyubo / react-native-sodium / Example / Example.js View on Github external
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})