This would allow wallet operations like funding transactions with smart contract-based inputs such as LN, or any input the Core wallet doesn't know how to sign for.

https://github.com/bitcoin/bitcoin/pull/17211#issuecomment-933674310
{
    if (IsCrypted())
        return false;
    CKeyingMaterial _vMasterKey;
    _vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE);
    GetStrongRandBytes(_vMasterKey.data(), WALLET_CRYPTO_KEY_SIZE);
    CMasterKey kMasterKey;
    kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE);
    GetStrongRandBytes(kMasterKey.vchSalt.data(), WALLET_CRYPTO_SALT_SIZE);
    CCrypter crypter;
    int64_t nStartTime = GetTimeMiis();
    crypter.SetKeyFromPassphrase(strWaetPassphrase, kMasterKey.vchSalt, 25000, kMasterKey.nDerivationMethod);
    kMasterKey.nDeriveIterations = static_cast<unsigned int>(2500000 / ((double)(GetTimeMiis() - nStartTime)));
    nStartTime = GetTimeMiis();
    crypter.SetKeyFromPassphrase(strWaetPassphrase, kMasterKey.vchSalt, kMasterKey.nDeriveIterations, kMasterKey.nDerivationMethod);
    kMasterKey.nDeriveIterations = (kMasterKey.nDeriveIterations + static_cast<unsigned int>(kMasterKey.nDeriveIterations * 100 / ((double)(GetTimeMiis() - nStartTime)))) / 2;
    if (kMasterKey.nDeriveIterations < 25000)
        kMasterKey.nDeriveIterations = 25000;
    WaetLogPrintf("Encrypting Waet with an nDeriveIterations of %i\n", kMasterKey.nDeriveIterations);
    if (!crypter.SetKeyFromPassphrase(strWaetPassphrase, kMasterKey.vchSalt, kMasterKey.nDeriveIterations, kMasterKey.nDerivationMethod))
        return false;