Java 等同于 mcrypt "ncfb" 模式是什么?

What is the Java equivalent of mcrypt "ncfb" mode?

我正在尝试将一些代码从 PHP 移植到 java,但这一行给我带来了麻烦:

$decrypted = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $encrypted, "ncfb", $iv);

查看有关密码的 java 文档,没有 'ncfb' 列出,其他模式之一是变相​​列出的 ncfb 吗?

来自this answer

Note that CFB and OFB in the rest of the document represent the "8bit CFB or OFB" mode. nOFB and nCFB modes represents a n-bit OFB/CFB mode, n is used to represent the algorithm's block size.

nCFB: The Cipher-Feedback Mode (in nbit). n Is the size of the block of the algorithm. This is a self synchronizing stream cipher implemented from a block cipher. This mode operates in streams.

根据 this 文档,Java 中的 Blowfish 有以下模式 (nCFB):

CFB8..CFB64

所以答案是:是的,有伪装的等效于 nCFB 的模式。