对于JAVA,是否有可靠的PBKDF2-HMAC-SHA256实现?
我以前用bouncycastle加密,但它没有提供PBKDF2WithHmacSHA256'.
我不想自己编写加密模块.
你能推荐任何替代的库或算法(如果我能坚持使用bouncycastle)
(这里是bouncycastle支持算法的算法) http://www.bouncycastle.org/specifications.html
我想通过 Spring-OpenFeign 从服务器下载一个文件并将其保存在本地目录中,并使用零拷贝。
简单的下载方法如下:
import org.apache.commons.io.FileUtils
@GetMapping("/api/v1/files")
ResponseEntity<byte[]> getFile(@RequestParam(value = "key") String key) {
ResponseEntity<byte[]> resp = getFile("filename.txt")
File fs = new File("/opt/test")
FileUtils.write(file, resp.getBody())
}
Run Code Online (Sandbox Code Playgroud)
在这段代码中,数据流将是这样的 feign Internal Stream -> Buffer -> ByteArray -> Buffer -> File
如何高效快速地下载和保存文件内存?