Table of Contents

Class XSalsa20Poly1305SuffixEncryption

Namespace
NetCord.Gateway.Voice.Encryption
Assembly
NetCord.dll
public sealed class XSalsa20Poly1305SuffixEncryption : IVoiceEncryption, IDisposable
Inheritance
XSalsa20Poly1305SuffixEncryption
Implements
Inherited Members

Constructors

XSalsa20Poly1305SuffixEncryption()

public XSalsa20Poly1305SuffixEncryption()

Properties

Expansion

The expansion of the encryption algorithm.

public int Expansion { get; }

Property Value

int

ExtensionEncryption

Whether the encryption algorithm encrypts the extension.

public bool ExtensionEncryption { get; }

Property Value

bool

Name

The name of the encryption algorithm.

public string Name { get; }

Property Value

string

Methods

Decrypt(RtpPacket, Span<byte>)

Decrypts a datagram using the encryption algorithm.

public void Decrypt(RtpPacket packet, Span<byte> plaintext)

Parameters

packet RtpPacket

The packet to decrypt.

plaintext Span<byte>

The resulting plaintext.

Dispose()

public void Dispose()

Encrypt(ReadOnlySpan<byte>, RtpPacketWriter)

Encrypts plaintext using the encryption algorithm.

public void Encrypt(ReadOnlySpan<byte> plaintext, RtpPacketWriter packet)

Parameters

plaintext ReadOnlySpan<byte>

The plaintext to encrypt.

packet RtpPacketWriter

The resulting packet.

SetKey(byte[])

Sets the key for the encryption algorithm.

public void SetKey(byte[] key)

Parameters

key byte[]

The key to set.