public static function decryptFilteredKey($encryptedKey, $masterKey){
        $cipher = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');
        $ivAndFilter = explode('-',$encryptedKey);
        $iv = hex2bin($ivAndFilter[0]);
        
        $filter = hex2bin($ivAndFilter[1]);
    
        if (mcrypt_generic_init($cipher, $masterKey, $iv) != -1) {
            $decrypted = mdecrypt_generic($cipher, $filter);    
            mcrypt_generic_deinit($cipher);
            mcrypt_module_close($cipher);
            
            $decryptedNoPadding = self::_unpad($decrypted,16);
            return $decryptedNoPadding;
        }
    }