All Downloads are FREE. Search and download functionalities are using the official Maven repository.

caliban.reporting.Util.scala Maven / Gradle / Ivy

The newest version!
package caliban.reporting

import zio.{ Task, ZIO }

import java.security.MessageDigest

object Util {

  private[caliban] def hashSchema(schema: String): Task[String] =
    ZIO.attempt(
      MessageDigest
        .getInstance("SHA-256")
        .digest(schema.getBytes("UTF-8"))
        .map("%02x".format(_))
        .mkString
    )

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy