Class/Object

org.ergoplatform.sdk

SecretString

Related Docs: object SecretString | package sdk

Permalink

final class SecretString extends AnyRef

Encapsulates secret array of characters (char[]) with proper equality. The secret data can be erased in memory and not leaked to GC. Note that calling any methods after erase() will throw a runtime exception. Using this class is more secure and safe than using char[] directly.

Secret data, should not be copied outside of this instance. Use static methods to construct new instances.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SecretString
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val _data: Array[Char]

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(obj: Any): Boolean

    Permalink

    this is adapted version of java.lang.String

    this is adapted version of java.lang.String

    Definition Classes
    SecretString → AnyRef → Any
  9. def erase(): Unit

    Permalink

    Erases secret characters stored in this instance so that they are no longer reside in memory.

  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getData(): Array[Char]

    Permalink

    Extracts secret characters as an array.

  13. def hashCode(): Int

    Permalink
    Definition Classes
    SecretString → AnyRef → Any
  14. def isEmpty(): Boolean

    Permalink

    Returns true if the string doesn't have characters.

  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. def toStringUnsecure(): String

    Permalink

    Returns unsecured String with secret characters.

    Returns unsecured String with secret characters. The secret characters are copied to the new String instance and cannot be erased in memory. So they leak to GC and may remain in memory until overwritten by new data. Usage of this method is discouraged and the method is provided solely to interact with legacy code which keeps secret characters in String.

  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped