Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (26 sloc) 922 Bytes
object MessageDigestExamples {
/** Imports */
import cats.Id
import cats.effect.{IO, Sync}
import fs2._
import tsec.common._
import tsec.hashing.jca._ //For this example, we will use our byteutil helpers
/**For direct byte pickling, use: */
/** Alternatively, use the algorithms directly
* Note: For the JCA, while you _can_ interpret
* into `IO` if you ever need to work in it, hashing
* is essentially pure. Thus, interpreting into `Id` is not unsafe
* in this case
/** Some Monad with a sync bound: **/
def hashPipeExample[F[_]: Sync](str: Stream[F, Byte]): Stream[F, Byte] = {
You can’t perform that action at this time.