FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
String into binary in WinDev
String into binary in WinDev
Débuté par Albina, 26 mai 2022 08:54 - 4 réponses
Connectez-vous…
Albina
#1
Posté le 26 mai 2022 - 08:54
Hello everyone,
According to WinDev help this should provide me with binary of the string. Am I right?
sRaw is string = Encrypt(sHash, "", encodeNone)
But it doesn't. Why?
Signaler
0
0
Albina
#2
Posté le 26 mai 2022 - 13:59
Problem solved, topic can be closed/deleted.
Signaler
0
0
argus
#3
Posté le 26 mai 2022 - 17:53
Im nto sure what you are trying to do, but your options combination is curious...
You are not defining the encryption type, so the default FAST is used
BUT you are not giving a password, so the encryption has nothing to work with
As for you original question, first if you want to get a binary return, use a buffer for the result variable or you will loose data, second, I'm guessing that you are not getting a binary value simply because you are not goving a password to the function, so it cannot encrypt the string, and if it dioes not encrypt the string, the option of choosing hwo the encrypted string is returned becomes moot.
Signaler
0
0
Albina
#4
Posté le 31 mai 2022 - 09:03
Thank you for your responce.
You're right about buffer, I found it the same day when I post my question. But then my research suddenly stopped as I succeded to get what I needed
I had to construct encryption method similar to the example in node js and finally did it.
I have another question about http request, can i contact you, if this is ok?
Signaler
0
0
SandraLewisFrin
#5
Membre enregistré
6 messages
Posté le 17 juin 2022 - 14:03
I'm assuming this is a homework assignment, so you shouldn't rely on bin or b-format.
Your biggest problem is that your int_to_reverse_binary function is implemented incorrectly. The instruction is clear, and in fact gave you a line-by-line break down of what you should be writing:
def int_to_reverse_binary(x): # For an integer x
output = "" # (initialize)
while x > 0: # As long as x is greater than 0...
output += str(x%2) # ... output x%2
x = x//2 # ... x = x//2
return output # (return your result)
After that in the reverse function, you need to capture the output from the function!
def string_reverse(input_string):
reversed_output = int_to_reverse_
https://shagle.download
binary(integer_value)
return
https://voojio.com/chatroom/omegle
reversed_output[::-1]
Message modifié, 17 juin 2022 - 14:04
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte