2

Due to HIPAA requirements, I need to encrypt data at rest. I have a BufferedSource that contains data from my api call.

The Okio documentation says

Sinks may be layered to transform received data, such as to compress, encrypt, throttle, or add protocol framing.

How do I use a Sink to perform this encryption?

Spencer
  • 311
  • 1
  • 3
  • 7

1 Answers1

3

At the moment Okio doesn’t have anything built-in. Easiest is to use BufferedSource.writeTo(Sink) to write your plaintext to an encrypted sink, which you can create using Okio.sink(OutputStream).

If you get a complete example working I'd love to use it as an example on the Okio GitHub page.

Jesse Wilson
  • 39,078
  • 8
  • 121
  • 128