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
Exceptionif 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 withtryandcatch(Exception) -
Pay special attention to methods in
Gateway, specifically-
Monitor has been subsumed into
Gatewayand nowGatewayowns blockchain communication. -
The
Gateway#decryptAndVerifyworks differently thanGateway#verify. In the former, all signatures are checked for validity and contact presence and only if all aretrueis the plaintext message returned; access to theVerificationResultitself is not there. In the latter, you get aVerificationResultand can do fine-grained checks.
-