object SecureRandom
- Alphabetic
- By Inheritance
- SecureRandom
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def execute[A](fn: (java.security.SecureRandom) => A): RIO[SecureRandom, A]
Provides the underlying
java.security.SecureRandom
used internally to the functionfn
.Provides the underlying
java.security.SecureRandom
used internally to the functionfn
.- returns
the value returned by
fn
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val live: Layer[NoSuchAlgorithmException, SecureRandom]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextBytes(length: => Int): RIO[SecureRandom, Chunk[Byte]]
Generates a pseudo-random Arrayuence of bytes of the specified length.
Generates a pseudo-random Arrayuence of bytes of the specified length.
- length
the requested length of the resulting
Chunk[Byte]
.- returns
a
Chunk[Byte]
of lengthlength
- def nextString(entropyBytes: => Int): RIO[SecureRandom, String]
Generates a base64-encoded pseudo-random string with
entropyBytes
bytes of entropy.Generates a base64-encoded pseudo-random string with
entropyBytes
bytes of entropy. The resulting string will longer thanentropyBytes
(or empty whenentropyBytes
is 0), as the base64 encoding requires additional space.- entropyBytes
the number of bytes of entropy to include in the returned
String
.- returns
a
String
with at leastentropyBytes
of entropy.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def setSeed(seed: => Long): URIO[SecureRandom, Unit]
Reseeds this random object, using the eight bytes contained in the given
seed
.Reseeds this random object, using the eight bytes contained in the given
seed
. The given seed supplements, rather than replaces, the existing seed. Thus, repeated calls are guaranteed never to reduce randomness.This method is defined for compatibility with
java.util.Random
.- seed
the seed.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()