cipher.getAuthTag()
只有在使用 cipher.final() 方法完成加密后才应调用 cipher.getAuthTag() 方法。
- Returns: <Buffer> When using an authenticated encryption mode (
GCM,CCMandOCBare currently supported), thecipher.getAuthTag()method returns aBuffercontaining the authentication tag that has been computed from the given data.
The cipher.getAuthTag() method should only be called after encryption has
been completed using the cipher.final() method.