private void checkCompleted() {
        if (mResult == null) {
            throw new IllegalStateException("Key agreement not completed");
        }
    }
Returns the expected result length for the given {@code key}.
common/src/main/java/org/conscrypt/OpenSSLBaseDHKeyAgreement.java