in oss-20190517/src/main/java/com/aliyun/sdk/service/oss20190517/encryption/internal/CipherInputStream.java [146:169]
private int nextChunk() throws IOException {
if (eof)
return -1;
bufout = null;
int len = in.read(bufin);
if (len == -1) {
eof = true;
try {
bufout = cryptoCipher.doFinal();
if (bufout == null) {
return -1;
}
curr_pos = 0;
return max_pos = bufout.length;
} catch (IllegalBlockSizeException e) {
} catch (BadPaddingException e) {
throw new SecurityException(e);
}
return -1;
}
bufout = cryptoCipher.update(bufin, 0, len);
curr_pos = 0;
return max_pos = (bufout == null ? 0 : bufout.length);
}