IPCryptNDXCtx

IPCryptNDX context, providing extended encryption/decryption. Ensures proper initialization and cleanup of the underlying IPCryptNDX context.

Constructors

this
this(const(ubyte)[] key)

Constructs an IPCryptNDXCtx with the given 32-byte key.

this
this(string hexKey)

Ditto, but constructs from a hexadecimal key string.

Destructor

~this
~this()

Destructor ensures the IPCryptNDX context is cleaned up.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

decryptIP16
ubyte[IPCRYPT_KEYBYTES] decryptIP16(const(ubyte)[] ndip)

Decrypt a non-deterministically encrypted 16-byte IP address, previously encrypted with ipcrypt_ndx_encrypt_ip16.333333

decryptIPStr
string decryptIPStr(string encryptedIPStr)

Decrypts an encrypted IP address string.

encryptIP16
ubyte[IPCRYPT_NDX_KEYBYTES] encryptIP16(const(ubyte)[] ip16, const(ubyte)[] random)

Encrypts a 16-byte IP address (IPv4 or IPv6) with extended non-determinism.

encryptIPStr
string encryptIPStr(string ipStr, const(ubyte)[] random)

Encrypts an IP address string with extended non-determinism.

ndipFromHex
ubyte[IPCRYPT_NDX_NDIP_BYTES] ndipFromHex(string hex)

Converts a hexadecimal string to a non-deterministic encrypted IP address.

Meta