我已经包括在内了
应用程序内渐变
compile 'org.apache.commons:commons-lang3:3.0'
在我包含的程序库中
-keep class org.apache.commons.lang3.StringUtils*
但当应用程序尝试访问StringUtils.rightPad()时。它抛出一个异常,说
java.lang.NoSuchMethodError: org.apache.commons.lang3.StringUtils.a
相关代码
public static String getSignedData(String data) {
int blockSize = 64;
byte[] key = StringUtils.rightPad(ApplicationConst.getCheckoutAccessKey(), blockSize, (char) 0x00).getBytes();
byte[] iPad = StringUtils.repeat((char) 0x36, blockSize).getBytes();
byte[] oPad = StringUtils.repeat((char) 0x5c, blockSize).getBytes();
byte[] stage1 = hashMessage(concatenate(xor(key, iPad), data.getBytes()));
byte[] stageFinal = hashMessage(concatenate(xor(key, oPad), stage1));
return bytesToHex(stageFinal);
}