cipher.final([outputEncoding])
-
返回:<Buffer> | <string> 任何剩余的加密内容。如果指定了
outputEncoding
,则返回字符串。如果未提供outputEncoding
,则返回Buffer
。¥Returns: <Buffer> | <string> Any remaining enciphered contents. If
outputEncoding
is specified, a string is returned. If anoutputEncoding
is not provided, aBuffer
is returned.
一旦调用了 cipher.final()
方法,则 Cipher
对象就不能再用于加密数据。多次尝试调用 cipher.final()
将导致抛出错误。
¥Once the cipher.final()
method has been called, the Cipher
object can no
longer be used to encrypt data. Attempts to call cipher.final()
more than
once will result in an error being thrown.