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

io.scalajs.nodejs.crypto.Sign.scala Maven / Gradle / Ivy

There is a newer version: 0.4.2
Show newest version
package io.scalajs.nodejs.crypto

import io.scalajs.nodejs.buffer.Buffer
import io.scalajs.nodejs.stream
import io.scalajs.nodejs.stream.Duplex

import scala.scalajs.js

/**
  * The Sign Class is a utility for generating signatures. It can be used in one of two ways:
  *
  * 
  • As a writable stream, where data to be signed is written and the sign.sign() method is used to generate and return * the signature, or
  • *
  • Using the sign.update() and sign.sign() methods to produce the signature.
  • * * The crypto.createSign() method is used to create Sign instances. Sign objects are not to be created directly using * the new keyword. * @author [email protected] */ @js.native trait Sign extends Duplex { def sign(private_key: String): String = js.native def sign(private_key: String, output_format: String): String = js.native def update(data: String, input_encoding: String): Unit = js.native def update(data: String): Unit = js.native def update(data: Buffer): Unit = js.native }




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy