If the message Undefined constant “Magento\Framework\Encryption\Adapter\SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES appears in your Magento 2 store, the PHP sodium extension is almost certainly missing or disabled. Install or enable sodium and the error should be resolved.