Java Reference
Overview
Keychain Core has a Java interface which can be used to write applications anywhere the JVM is available - which today is almost anywhere!
The Java wrapper in v2.4 has some non-obvious differences with Keychain Core that the developer should be aware of. See [the notes below] for more information.
Objects
Character encoding enumeration |
|
A |
|
Thread used by the |
|
The various Exceptions that can be thrown from the wrapper |
|
Class representing a self-sovereign identity |
|
The cryptographic management object which also refreshes itself with blockchain updates |
|
Enumeration for the monitor thread state |
|
Development/POC example of a bare-bones Trusted Directory interface |
|
Facade blockchain state enumeration |
|
A |
|
Provided to |
|
Encryption strength enumeration |
|
Abstraction of configuration file |
|
Location of Facade certificate on blockchain |
|
Information about a signature’s validity |
|
Result of verifying a signed message |
Notes
-
Almost every method throws unchecked
Exception
if there is an internal error in the Keychain library. While in future versions of the wrapper these will be turned into checked exceptions with better names, in the meantime please wrap important sections of code withtry
andcatch(Exception)
-
Pay special attention to methods in
Gateway
, specifically-
Monitor has been subsumed into
Gateway
and nowGateway
owns blockchain communication. -
The
Gateway#decryptAndVerify
works differently thanGateway#verify
. In the former, all signatures are checked for validity and contact presence and only if all aretrue
is the plaintext message returned; access to theVerificationResult
itself is not there. In the latter, you get aVerificationResult
and can do fine-grained checks.
-