Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SDES encryption #97

Closed
wants to merge 1 commit into from
Closed

fix SDES encryption #97

wants to merge 1 commit into from

Conversation

MilanKral
Copy link
Contributor

This is a possible fix for the issue:

No static method decodeBase64(Ljava/lang/String;)[B in class Lorg/apache/commons/codec/binary/Base64; or its super classes

#91

After the fix SDES works correctly.

The library ch.imvs.sdes4j is directly included in the source code.
Imports for org.apache.commons.codec.binary are replaced with
a local copy org2.apache.commons.codec.binary .

cmeng-git#91

After the fix SDES works correctly.

The library ch.imvs.sdes4j is directly included in the source code.
Imports for org.apache.commons.codec.binary are replaced with
a local copy org2.apache.commons.codec.binary .
@cmeng-git
Copy link
Owner

You do not need to include the whole sdes4j source into aTalk project but uses the jarjar tool to rename the reference class name in sdes4j. Then just include the newly re-reference class into aTalk project directory. i.e. just copy apache Base64 class and rename to ApacheBase64 (new reference from sde4j) into aTalk project. I have already implemented this fix and will be in next aTalk release.

========== aTalk build.gradle ===========
    // implementation 'ch.imvs:sdes4j:1.1.4'
    // libraries from maven repository but need to change Base64 to ApacheBase64 to avoid conflict with android
    // declaration of 'org.apache.commons.codec.binary.Base64' appears in /system/framework/org.apache.http.legacy.boot.jar
    implementation jarjar.repackage {
        from('ch.imvs:sdes4j:1.1.4') {
            transitive = false
        }
        destinationDir new File("${projectDir}/libs")
        destinationName "sde4j-1.1.4.jar"

        classRename 'org.apache.commons.codec.binary.Base64', 'org.apache.commons.codec.binary.ApacheBase64'
    }

@MilanKral
Copy link
Contributor Author

ok, I will then close the pull request

@MilanKral MilanKral closed this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants