Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implementation of java.security.SecureRandom for Scala.js in browsers and Node.js

License

NotificationsYou must be signed in to change notification settings

scala-js/scala-js-java-securerandom

Repository files navigation

scalajs-java-securerandom providesjava.security.SecureRandom for Scala.js, in Node.js, in browsers, and in other environments that provide the Web Crypto API.

Usage

Use the following dependency:

libraryDependencies+= ("org.scala-js"%%%"scalajs-java-securerandom"%"1.0.0").cross(CrossVersion.for3Use2_13)

When using acrossProject, add the above in.jsSettings(...).

You can then usejava.security.SecureRandom from your code, and by extension, thejava.util.UUID.randomUUID() method.

When running in an unsupported environment, ajava.lang.UnsupportedOperationException will be thrown when trying to instantiatejava.security.SecureRandom.

Supported environments are:

  • Node.js,
  • Browsers,
  • UsingJSDOM >= 20.0.0
  • Other environments that providecrypto.getRandomValues(typedArray), from the Web Crypto API.

License

scalajs-java-securerandom is distributed under theApache 2.0 license, like Scala.js itself.

About

Implementation of java.security.SecureRandom for Scala.js in browsers and Node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp