android - Java: BouncyCastle - SpongyCastle and Conditional Compiling -


thanks android shipping own, outdated versions of bouncycastle crypto libraries i'm in ugly situation. i've built library talks rest our own webservice data encrypted , decrypted on fly client. client can either mobile application on android or desktop/server computer running oracle java.

for android need spongycastle , desktop/server need bouncycastle because spongycastle jars not signed , oracle runtime won't allow crypto stuff.

the thing is, code same, regardless of library beingused. imports different because of package names. in c i'd use conditional compiling include platform specific headers, not in java, know. still, there way without effort can achieve similar, create 2 builds same source? i'd hate have 2 .java files same have different imports. that's maintainance nightmare.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -