diff --git a/lib/tdf3/src/client/builders.ts b/lib/tdf3/src/client/builders.ts index 9ad91d44..b9ea6a0e 100644 --- a/lib/tdf3/src/client/builders.ts +++ b/lib/tdf3/src/client/builders.ts @@ -232,7 +232,7 @@ class EncryptParamsBuilder { setStringSource(string: string) { const stream = new ReadableStream({ pull(controller) { - controller.enqueue(string); + controller.enqueue(new TextEncoder().encode(string)); controller.close(); }, });