Class RepoLocator
java.lang.Object
lol.trq.alts.vault.RepoLocator
The token the owner gives a joiner (AVP SPEC 11.2): the repository id, the owner's home host (its key and
its locator) and the fingerprint of the owner key. The joiner reaches the owner's home host with it, by
key (
VaultHosts.connect(RepoLocator)), and checks, once it has pulled the chain, that the genesis
owner key matches the fingerprint (SharedVault.join(VaultHost, VaultIdentity, RepoLocator)).
It holds no secret: its text() is meant to be pasted to someone.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionavpUri()Theavp://<hostLocator>/<repoId>address of the repository at the owner's home host.booleanWhetherois a locator with the same text.inthashCode()Hashes whatequals(Object)compares.hostKey()The key of the owner's home host, base64.Where the owner's home host is reached,hostorhost:port: a hint, never the host's identity, which is its key.The owner fingerprint, 16 hex digits ofSHA-256(ownerKey), to compare with the one the owner sees (OwnerIdentity.fingerprint()).static RepoLocatorReads a repo locator from pasted text.repoId()The repository id, 22 base64url characters; a repository's identity, which never names a host.text()The token text to give the joiner: base64url without padding (SPEC 11.1).toString()The address and the owner fingerprint.
-
Method Details
-
parse
Reads a repo locator from pasted text. Whitespace anywhere in the text (around it, or a line break a chat client inserted) is ignored.- Parameters:
text- the pasted text- Returns:
- the locator
- Throws:
AltsException- of kindINVALID_INPUTif the text is not a version 2 repo locator- Since:
- 1.0.0
-
text
The token text to give the joiner: base64url without padding (SPEC 11.1).- Returns:
- the text
- Since:
- 1.0.0
-
repoId
The repository id, 22 base64url characters; a repository's identity, which never names a host.- Returns:
- the id
- Since:
- 1.0.0
-
hostKey
The key of the owner's home host, base64.- Returns:
- the host key
- Since:
- 1.0.0
-
hostLocator
Where the owner's home host is reached,hostorhost:port: a hint, never the host's identity, which is its key.- Returns:
- the host locator
- Since:
- 1.0.0
-
ownerFingerprint
The owner fingerprint, 16 hex digits ofSHA-256(ownerKey), to compare with the one the owner sees (OwnerIdentity.fingerprint()).- Returns:
- the fingerprint
- Since:
- 1.0.0
-
avpUri
Theavp://<hostLocator>/<repoId>address of the repository at the owner's home host.- Returns:
- the address
- Since:
- 1.0.0
-
equals
-
hashCode
public int hashCode()Hashes whatequals(Object)compares. -
toString
-