cipher.getAuthTag()


  • 返回: <Buffer> 当使用认证的加密模式时(当前支持 GCMCCMOCB),则 cipher.getAuthTag() 方法返回 Buffer,其中包含根据给定数据计算出的认证标签。

只有在使用 cipher.final() 方法完成加密后才应调用 cipher.getAuthTag() 方法。

  • Returns: <Buffer> When using an authenticated encryption mode (GCM, CCM and OCB are currently supported), the cipher.getAuthTag() method returns a Buffer containing 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.