|
JubeatPlus 3.9.11
|
The jubeat Lab URL cipher. More...
import <Foundation/Foundation.h>
Go to the source code of this file.
Functions | |
| NS_ASSUME_NONNULL_BEGIN NSMutableData *_Nullable | CreateLabEncryptedData (NSString *_Nullable pszString) |
| Blowfish-encrypts a string with the Lab key. | |
| NSData *_Nullable | GetBgmCipherKey (void) |
| The Blowfish key the packed asset archives are enciphered with. | |
The jubeat Lab URL cipher.
Reconstructed from Ghidra program Jubeat (image base 0x100000000). All
The one caller is -[JubeatAppDelegate application:didFinishLaunchingWithOptions:], which uses it once on first launch to obfuscate the Lab URL before storing it in user defaults.
| NS_ASSUME_NONNULL_BEGIN NSMutableData *_Nullable CreateLabEncryptedData | ( | NSString *_Nullable | pszString | ) |
Blowfish-encrypts a string with the Lab key.
The launch handler calls this once, on first launch only, to turn the plaintext Lab URL into the blob it persists under the "PrefjubeatLabURL" user default.
The returned object is the same buffer that was enciphered, not a copy, so it is mutable and a caller could keep changing it. The key is an MD5 of a 19-character passphrase that this function rebuilds on its own stack rather than calling CreateLabUrlCipherKey at 0x7f9b0, though the passphrase is byte-for-byte the same.
One edge is worth knowing about: -dataUsingEncoding: returns nil for input it cannot encode, and +dataWithData: raises on nil rather than returning it, so a malformed string throws rather than producing the nil this function's nil check implies it handles.
| pszString | The plaintext. nil is accepted and yields nil. |
| NSData *_Nullable GetBgmCipherKey | ( | void | ) |
The Blowfish key the packed asset archives are enciphered with.
DECLARED ONLY. Despite the name it is not limited to audio: -[ArtworkLoader loadArtwork] uses it to decipher artwork out of the same archives. The name is Ghidra's, already applied to the function in the program database.
-[BFCodec cipherInit:] .