diff --git a/docs/content/en/docs/getting_started.md b/docs/content/en/docs/getting_started.md index 3c1a6a2b4..b8a49118e 100644 --- a/docs/content/en/docs/getting_started.md +++ b/docs/content/en/docs/getting_started.md @@ -306,19 +306,12 @@ Where `dot_product_main.cpp` is a new file containing #include "heir_output.h" int main(int argc, char *argv[]) { - CCParams parameters; - // TODO(#661): replace this setup with a HEIR-generated helper function - parameters.SetMultiplicativeDepth(2); - parameters.SetPlaintextModulus(65537); - CryptoContext cryptoContext = GenCryptoContext(parameters); - cryptoContext->Enable(PKE); - cryptoContext->Enable(KEYSWITCH); - cryptoContext->Enable(LEVELEDSHE); + CryptoContext cryptoContext = dot_product__generate_crypto_context(); KeyPair keyPair; keyPair = cryptoContext->KeyGen(); - cryptoContext->EvalMultKeyGen(keyPair.secretKey); - cryptoContext->EvalRotateKeyGen(keyPair.secretKey, {1, 2, 4, 7}); + + cryptoContext = dot_product__configure_crypto_context(cryptoContext, keyPair.secretKey); int32_t n = cryptoContext->GetCryptoParameters() ->GetElementParams() diff --git a/tests/Examples/openfhe/dot_product_8_test.cpp b/tests/Examples/openfhe/dot_product_8_test.cpp index 6307b38ce..0b7093b02 100644 --- a/tests/Examples/openfhe/dot_product_8_test.cpp +++ b/tests/Examples/openfhe/dot_product_8_test.cpp @@ -19,8 +19,6 @@ namespace heir { namespace openfhe { TEST(DotProduct8Test, RunTest) { - // TODO(#661): Generate a helper function to set up CryptoContext based on - // what is used in the generated code. auto cryptoContext = dot_product__generate_crypto_context(); auto keyPair = cryptoContext->KeyGen(); auto publicKey = keyPair.publicKey;