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

io.github.edadma.nodejs.crypto.scala Maven / Gradle / Ivy

Go to download

A minimal Scala.js facade library providing the Node.js bindings needed to support the Apion web framework

The newest version!
package io.github.edadma.nodejs

import scala.scalajs.js
import scala.scalajs.js.annotation.*
import scala.scalajs.js.typedarray.Uint8Array

@js.native
@JSImport("crypto", JSImport.Namespace)
object crypto extends js.Object:
  def createHmac(algorithm: String, key: String | Uint8Array): Hmac = js.native
  def randomBytes(size: Int): Uint8Array                            = js.native

@js.native
trait Hmac extends js.Object:
  def update(data: String): Hmac       = js.native
  def digest(encoding: String): String = js.native




© 2015 - 2025 Weber Informatics LLC | Privacy Policy