Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Reversing small encryption function

Hello, guys I'm having a small challenge at school,
Where I need to reverse an encryption function to find the decryption function..

Im originally a javascript developer so i find it a bit hard to understand whats going on here:

Code
def GGGGotate(lol):
    bit = lol << 1
    movebit = bit & 255
    if (lol > 127):
    movebit = movebit | 1
    return (movebit)

If anyone can help me reverse this or simply understand what's going on it will be greatly appreciated.

PS: this is only a small part of the encryption function where I'm stuck it's not the full function!
Hey man,
this is called Bitwise Opeators, you can learn of it from https://wiki.python.org/moin/BitwiseOperators
If you need help, send me a convo I'll answer you right away
(Nov 24, 2020 05:36 AM)G.P.D. Wrote:  Hey man,
this is called Bitwise Opeators, you can learn of it from https://wiki.python.org/moin/BitwiseOperators
If you need help, send me a convo I'll answer you right away

Thank you for answering I sent you a convo!


Still Need Help guys If someone can help!
Code
def deGGGotate(value):
    xbit = (value & 1)  << 7
    return(value >> 1) | xbit


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by WallahiMay 15, 2022 12:25 PM 3 221 May 15, 2022 12:25 PM
Last Post: GenericSkid
[C] by FhackMar 2, 2022 03:52 AM 4 307 Mar 2, 2022 03:52 AM
Last Post: Fhack
[C] by F-NukeJul 6, 2021 02:29 AM 16 1,395 Jul 6, 2021 02:29 AM
Last Post: BigDawgAustin