AES 密钥封装模式
🌐 AES key wrap modes
AES 密钥封装(AES-WRAP)和带填充的 AES 密钥封装(AES-WRAP-PAD)加密器操作的是完整的密钥数据值,而不是逐字节的流。逆变换版本也有相同的处理限制。
🌐 AES key wrap (AES-WRAP) and AES key wrap with padding (AES-WRAP-PAD)
ciphers operate on a complete key-data value rather than on an incremental byte
stream. The inverse-transform variants have the same processing restrictions.
使用 AES 密钥封装密码的应用必须遵守以下限制:
🌐 Applications which use an AES key wrap cipher must adhere to these restrictions:
cipher.update()或decipher.update()必须恰好用完整且非空的输入值调用一次。- 不要把 AES 密钥封装密码当作通用
stream.Transform流来使用。像write(data)、end(data)和pipe()这样的方法可以把一个值拆分到多个更新中,每次更新都会被当作一次独立的封装或解封操作。 cipher.final()或decipher.final()仍然需要被调用来完成操作。