(self,masterkey,masterseed,masterseed2,rounds)
return hashlib.sha256(masterseed + key).digest()
Munge masterkey into the final key for decrypting payload by
        encrypting it for the given number of rounds masterseed2 and
        hashing it with masterseed.
Munge masterkey into the final key for decrypting payload by
        encrypting it for the given number of rounds masterseed2 and
        hashing it with masterseed.
Munge masterkey into the final key for decrypting payload by encrypting it for the given number of rounds masterseed2 and hashing it with masterseed .
def final_key(self,masterkey,masterseed,masterseed2,rounds):
        '''Munge masterkey into the final key for decrypting payload by
        encrypting it for the given number of rounds masterseed2 and
        hashing it with masterseed.'''
        from Crypto.Cipher import AES
        import hashlib

        key = hashlib.sha256(masterkey).digest()
        cipher = AES.new(masterseed2,  AES.MODE_ECB)
        
        while rounds:
            rounds -= 1
            key = cipher.encrypt(key)
            continue
        key = hashlib.sha256(key).digest()
        return hashlib.sha256(masterseed + key).digest()
def final_key ( self , masterkey , masterseed , masterseed2 , rounds ) : from Crypto . Cipher import AES import hashlib key = hashlib . sha256 ( masterkey ) . digest ( ) cipher = AES . new ( masterseed2 , AES . MODE_ECB ) while rounds : rounds -= 1 key = cipher . encrypt ( key ) continue key = hashlib . sha256 ( key ) . digest ( ) return hashlib . sha256 ( masterseed + key ) . digest ( )