IPCrypt2

IPCrypt context, providing encryption/decryption of IP addresses. Ensures proper initialization and cleanup of the underlying IPCrypt context.

Constructors

this
this(const(ubyte)* key)

Constructs an IPCrypt2 with the given 16-byte key.

this
this(string hexKey)

Ditto, but constructs from a hexadecimal key string.

Destructor

~this
~this()

Destructor ensures the IPCrypt context is cleaned up.

Postblit

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

Members

Functions

decryptIP16
ubyte[IPCRYPT_KEYBYTES] decryptIP16(const(ubyte)* ip16)

Decrypts a 16-byte IP address (IPv4 or IPv6).

decryptIPStr
string decryptIPStr(string encryptedIPStr)

Decrypts an encrypted IP address string.

encryptIP16
ubyte[IPCRYPT_KEYBYTES] encryptIP16(const(ubyte)* ip16)

Encrypts a 16-byte IP address (IPv4 or IPv6).

encryptIPStr
string encryptIPStr(string ipStr)

Encrypts an IP address string (IPv4 or IPv6).

ndDecryptIP16
ubyte[IPCRYPT_KEYBYTES] ndDecryptIP16(const(ubyte)* ndip)

Non-deterministic decryption of a 24-byte encrypted IP address.

ndDecryptIPStr
string ndDecryptIPStr(const(char)* encryptedIPStr)

Non-deterministic decryption of an encrypted IP address string.

ndEncryptIP16
ubyte[IPCRYPT_NDIP_BYTES] ndEncryptIP16(const(ubyte)* ip16, const(ubyte)* random)

Non-deterministic encryption of a 16-byte IP address.

ndEncryptIPStr
string ndEncryptIPStr(const(char)* ipStr, const(ubyte)* random)

Non-deterministic encryption of an IP address string.

Meta