How to use the react-native-sodium.sodium_version_string 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
_testSodium() {
    Sodium.sodium_version_string()
      .then((version) => this.setState({sodium_version_string: version}))
      .catch((error) => this._handleError(error))

    // Random data generation
    this._testRandom1()
    this._testRandom2()
    this._testRandom3()

    // Secret key cryptography - authenticated encryption
    this._testSecretBox1()

    // Secret key cryptography - authentication
    this._testAuth1()

    // Public-key cryptography - authenticated encryption
    this._testBox1()