Skip to content

jna 5.17.0 Incompatibility with lazysodium-java 5.2.0 #142

@ParaskP7

Description

@ParaskP7

Hi team, in this woocommerce-android open-source project of ours, which is using this EncryptedLogging open-source library of ours, after updating jna to 5.17.0 and lazysodium-android to 5.2.0 to get that library 16 KB page size compatible (see libs.versions.toml), we are now getting the below crashes:

Structure.getFieldOrder() on class com.goterl.lazysodium.interfaces.SecretStream$State$ByReference
returns names ([_pad, k, nonce]) which do not match declared field names ([_pad, k])

and/or...

Structure.getFieldOrder() on class com.goterl.lazysodium.interfaces.SecretStream$State$ByReference
returns names ([_pad, k, nonce]) which do not match declared field names ([_pad, nonce])

...plus other combinations like that, ie [_pad], [k, nonce], versus [_pad, k, nonce], although less frequent... 🤔

It seems that lazysodium-java 5.2.0's SecretStream$State$ByReference structure declares fields [_pad, k, nonce] but jna 5.17.0 only recognizes [_pad, k] and/or [_pad, nonce] due to changes in how jna handles Structure field declarations.

Any ideas on that? 🤔

Many thanks for helping out! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions