final class Secret[T] extends AnyRef
The Secret class represent a secret value of type T.
The value is implicitly offuscated when creating the Secret instance using an implicit Offuser instance which, by default, transform the value
into a shuffled Array[Byte].
The offuscated value is de-offuscated using an implicit DeOffuser instance every time the method use is invoked which returns the original
value un-shuffling the bytes and converting them back to T.
Example
val secretString: Secret[String] = Secret("my_password") val secretValue: Either[NoLongerValidSecret, String] = secretString.use
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Secret
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new Secret(offuscatedValue: Array[Byte], seed: Seed)
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() @IntrinsicCandidate()
- def destroy(): Unit
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(obj: Any): Boolean
- Definition Classes
- Secret → AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- Secret → AnyRef → Any
- def isDestroyed: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Secret → AnyRef → Any
- def unsafeUse(implicit deOffuser: DeOffuser[T]): T
- def use(implicit deOffuser: DeOffuser[T]): Either[NoLongerValidSecret, T]
- def useAndDestroy(implicit deOffuser: DeOffuser[T]): Either[NoLongerValidSecret, T]
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated