cipher.final([outputEncoding])
outputEncoding<string> 返回值的编码。- 返回:<Buffer> | <string> 任何剩余的加密内容。如果指定了
outputEncoding,将返回一个字符串。如果未提供outputEncoding,将返回一个Buffer。
如果在之前对 cipher.update() 的调用中指定了输出编码,outputEncoding 必须使用相同的编码。
🌐 If an output encoding was specified in a previous call to
cipher.update(), outputEncoding must use the same encoding.
一旦调用了 cipher.final() 方法,Cipheriv 对象将无法再用来加密数据。多次调用 cipher.final() 将会导致抛出错误。
🌐 Once the cipher.final() method has been called, the Cipheriv object can no
longer be used to encrypt data. Attempts to call cipher.final() more than
once will result in an error being thrown.