Go to the source code of this file.
|
| void | NetCryptInit () |
| | Register Blowfish and start the shared CBC state with the default key and initial vector.
|
| void | NetCryptMakeKey (unsigned char pKey[kNetCryptKeySize]) |
| | Draw a random key and initial vector for NetCryptSetKey().
|
| void | NetCryptSetKey (const unsigned char pKey[kNetCryptKeySize]) |
| | Replace the stored key and initial vector.
|
| void | NetCryptEncrypt (void *pData, int nSize) |
| | Encrypt the whole eight-byte blocks of a buffer in place, from the stored initial vector.
|
| void | NetCryptDecrypt (void *pData, int nSize) |
| | Decrypt the whole eight-byte blocks of a buffer in place, from the stored initial vector.
|
◆ NetCryptInit()
Register Blowfish and start the shared CBC state with the default key and initial vector.
- Ghidra address:
- NTSC-U/C: 0x0026b4d0
- Ghidra address:
- PAL: 0x00275060
◆ NetCryptMakeKey()
| void NetCryptMakeKey |
( |
unsigned char | pKey[kNetCryptKeySize] | ) |
|
Draw a random key and initial vector for NetCryptSetKey().
The routine stores kNetCryptKeyWords random words.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x0026b578
- Ghidra address:
- PAL: 0x00275108
◆ NetCryptSetKey()
| void NetCryptSetKey |
( |
const unsigned char | pKey[kNetCryptKeySize] | ) |
|
Replace the stored key and initial vector.
The cipher state keeps the key NetCryptInit() set up, and only the initial vector takes effect.
- Parameters
-
| pKey | The eight bytes of the key followed by the eight bytes of the initial vector. |
- Ghidra address:
- NTSC-U/C: 0x0026b5c0
- Ghidra address:
- PAL: 0x00275150
◆ NetCryptEncrypt()
| void NetCryptEncrypt |
( |
void * | pData, |
|
|
int | nSize ) |
Encrypt the whole eight-byte blocks of a buffer in place, from the stored initial vector.
- Parameters
-
| pData | The buffer. |
| nSize | The size of the buffer in bytes. |
- Ghidra address:
- NTSC-U/C: 0x0026b5f8
- Ghidra address:
- PAL: 0x00275188
◆ NetCryptDecrypt()
| void NetCryptDecrypt |
( |
void * | pData, |
|
|
int | nSize ) |
Decrypt the whole eight-byte blocks of a buffer in place, from the stored initial vector.
- Parameters
-
| pData | The buffer. |
| nSize | The size of the buffer in bytes. |
- Ghidra address:
- NTSC-U/C: 0x0026b688
- Ghidra address:
- PAL: 0x00275218
◆ kNetCryptKeySize
| int kNetCryptKeySize = 16 |
|
constexpr |
Blowfish in CBC mode over the packets of an online session.
The routines share one cipher state, keyed once by NetCryptInit(). The names are inferred. The bytes of the key and of the initial vector NetCryptSetKey() takes.
◆ kNetCryptKeyWords
| int kNetCryptKeyWords = 4 |
|
constexpr |