![]() Calls RIJNDAEL_Encrypt, giving it the buffer, the password, and the argument 2 (which I’ll guess means decrypt).Reads the first 13 bytes of the config file into that buffer.DIM AS BYTE Result = 0 DIM AS STRING LineBuff = SPACE ( 16 ), DecryptedHeader OPEN ConfigFile FOR BINARY AS # 1 GET # 1, 13, LineBuff CLOSE # 1 DebugOut ( "Checking given password." ) DecryptedHeader = RIJNDAEL_Encrypt ( LineBuff, PassPhrase, 2 ) DebugOut ( "DecryptedHeader = " + DecryptedHeader ) IF LEFT ( DecryptedHeader, 10 ) = "Monika <3 " THEN Result = 1 RETURN Result END FUNCTION Here it is:įUNCTION CheckPassPhrase () AS BYTE REM Returns 1 if the Passphrase decrypted the file's header properly, 0 otherwise. The CheckPassPhrase function is a good place to start looking. Call CheckPassPhrase(), and if it isn’t 1, then sleep for two seconds, print rejection message, and exit.Append bytes to the end of the string, and then take the first 16 characters.If the length of PassPhrase is 0, sleep for two seconds, print rejection message, and exit.I’ll need to check what “hash” means here. There’s a comment about hashing with “*”, max 30 characters, and no escape chars. Calls GetText("*", 30, 0) and store the result in PassPhrase.In the case I’m interesting in, where the file exists, the return is one, and I’ll continue on that path. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |