Skip to main content
TLSSocket.prototype.getCipher - node__tls.d.ts - Node documentation
method TLSSocket.prototype.getCipher

Usage in Deno

```typescript import { TLSSocket } from "node:node__tls.d.ts"; ```
TLSSocket.prototype.getCipher(): CipherNameAndProtocol
Returns an object containing information on the negotiated cipher suite. For example, a TLSv1.2 protocol with AES256-SHA cipher: ```json { "name": "AES256-SHA", "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", "version": "SSLv3" } ``` See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information.

Return Type