Class VerificationResult

Package: io.keychain.core

public enum VerificationResult
extends java.lang.Object

Description

The VerificationResult encapsulates the result of verifying digital signatures in a signed text. A signed text is decomposed during verification into the message, encoding, and collection of Verification objects, 1 per signature.

Since: v2.0

Public Member Functions

Return type Method and Description

byte[]

getClearText()

Gets clear text of the signed data.

CharEncoding

getEncoding()

Gets character encoding of cleartext.

ArrayList<Verification>

getVerifications()

Gets list of verifications.

Public Member Functions Detail

getClearText

byte[] getClearText()

Gets the clear text that was signed. Note that this is called "clear text" but may in fact be another Keychain message which is itself signed, or even encrypted. It is returned as a byte[] precisely because it may not be a plaintext string.

Returns:

The byte[] that was signed

getEncoding

CharEncoding getEncoding()

Gets the character encoding of the underlying byte[] clear text.

For a signed data which was signed by Java v2.4 this will always be UTF16. The Java wrapper does not permit passing in an encoding string when encrypting or signing, so even though the object being encrypted/signed is a byte[], it is assumed to be bytes representing a Java String. This will be changed in v3.

This only applies to data signed by the Java wrapper. Data signed by the C++, Python, etc wrappers is not impacted.

Returns:

The character encoding of the clear text (UTF16 if signed by Java)

getVerifications

ArrayList[Verification] getVerifications()

Gets the full list of Verification objects from the signed data. There will be 1 Verification for every signature. The order of verifications in the list is not guaranteed to be the same as the signing order.

Returns:

The list of verifications