tuweni / org.apache.tuweni.scuttlebutt.discovery / LocalIdentity

LocalIdentity

class LocalIdentity (source)

Representation of an identity associated with an IP and port, used for Scuttlebutt local discovery.

See https://ssbc.github.io/scuttlebutt-protocol-guide/ for a detailed description of this identity.

Constructors

<init>

LocalIdentity(ip: String, port: String, id: Identity)
LocalIdentity(ip: String, port: Int, id: Identity)
LocalIdentity(addr: InetSocketAddress, id: Identity)

Constructor for a local identity

Functions

equals

fun equals(other: Any?): Boolean

fromString

static fun fromString(str: String): LocalIdentity

Create a local identity from a String of the form net:IP address:port~shs:base64 of public key

hashCode

fun hashCode(): Int

toCanonicalForm

fun toCanonicalForm(): String

toString

fun toString(): String