Skip to main content
Cipher.prototype.final - node__crypto.d.ts - Node documentation
method Cipher.prototype.final

Usage in Deno

```typescript import { Cipher } from "node:node__crypto.d.ts"; ```
Cipher.prototype.final(): Buffer
Once the `cipher.final()` method has been called, the `Cipher` object can no longer be used to encrypt data. Attempts to call `cipher.final()` more than once will result in an error being thrown.

Return Type

Buffer
Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a Buffer is returned.
Cipher.prototype.final(outputEncoding: BufferEncoding): string

Parameters

outputEncoding: BufferEncoding

Return Type

string