Table of Contents

Interface ISecurityContext

Namespace
MongoDB.Driver.Core.Authentication
Assembly
MongoDB.Driver.Core.dll

Represents the security context being used for authentication.

public interface ISecurityContext : IDisposable
Inherited Members

Properties

IsInitialized

Whether the security context has been initialized.

bool IsInitialized { get; }

Property Value

bool

Methods

DecryptMessage(int, byte[])

Decrypts ciphertext to plaintext.

byte[] DecryptMessage(int messageLength, byte[] encryptedBytes)

Parameters

messageLength int

Number of message bytes. Remaining bytes are the security trailer.

encryptedBytes byte[]

Ciphertext to decrypt.

Returns

byte[]

Decrypted plaintext.

EncryptMessage(byte[])

Encrypts plaintext to ciphertext.

byte[] EncryptMessage(byte[] plainTextBytes)

Parameters

plainTextBytes byte[]

Plaintext to encrypt.

Returns

byte[]

Encrypted ciphertext.

Next(byte[])

Negotiates the steps of an authentication handshake.

byte[] Next(byte[] challenge)

Parameters

challenge byte[]

Challenge received from the MongoDB server.

Returns

byte[]

Response to send back to the MongoDB server.