Need support for dynamic keyId while encryption in typescript

In the current example of data encryption it creates a default key ID while initialization. (samples-typescript/encryption/src/data-converter.ts at main · temporalio/samples-typescript · GitHub)
Is there any way to create the keyID dynamically. I’m receiving the keyID as input headers while running workflow. How can I pass this keyId to dataConverter?

Basically I want the data encryption turned On/Off based on the keyID.