decipher.final([outputEncoding])


  • outputEncoding <string> 返回值的编码
  • 返回: <Buffer> | <string> 任何剩余的解密内容。 如果指定了 outputEncoding,则返回字符串。 如果未提供 outputEncoding,则返回 Buffer

一旦调用了 decipher.final() 方法,就不能再使用 Decipher 对象来解密数据。 多次尝试调用 decipher.final() 将导致抛出错误。

  • outputEncoding <string> The encoding of the return value.
  • Returns: <Buffer> | <string> Any remaining deciphered contents. If outputEncoding is specified, a string is returned. If an outputEncoding is not provided, a Buffer is returned.

Once the decipher.final() method has been called, the Decipher object can no longer be used to decrypt data. Attempts to call decipher.final() more than once will result in an error being thrown.