返回任何加密的内容。如果 outputEncoding 参数是'latin1', 'base64' 或者 'hex',返回字符串。 如果没有提供 outputEncoding,则返回Buffer

一旦方法已被调用, Cipher 对象就不能再用于加密数据。如果试图再次调用,将会抛出一个错误。

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

Once the method has been called, the Cipher object can no longer be used to encrypt data. Attempts to call more than once will result in an error being thrown.