Re: How to omit blank spaces in the text?



hey,,,,i've got the same problem...with spaces
only that the compiler doesn't recognise neither Trim or Replace...
has something to do with libraries?

"Dave O." wrote:

In this context a hash can be a number formed from the ASCII values of each
character and the positions of each character, the idea is that you will get
a different number for the same characters in a different order. The maths
should throw away some of the numbers (normally the most significant
figure(s)) so that it is impossible to reverse the maths to get the original
plaintext. This is very different from encryption where you do need to get
the original plaintext back.
When the password is first created you calculate the hash and store that,
then to test a password you use the same routine to calculate the hash of
the entered password then compare that with the stored hash, if they match
then it is almost certain the entered password is correct. I say "almost"
because most hash routines will return a long so there are only just over 4
billion possible hashes but an infinite number of potential passwords or
phrases, hence in theory it is possible for a wrong password to work but the
odds are about 4,000,000,000 to 1 against, so I don't lose a lot of sleep
over it.
Another advantage is that you are just storing a number so the user can have
as long a password or pass-phrase they want. Pass-phrases are good because
they can be really long and still easy to remember.

As for the actual hash routine, have a look around, some people may suggest
some or there should be some available on the net.

Regards
Dave O.

"Ruslan" <Ruslan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:294B3C16-F1D3-48F6-A131-8E97630B1C90@xxxxxxxxxxxxxxxx
Dear Dave,
I need some clarification on the following :
'
You should create a non-reversible hash from the password, store that and
then compare it to the hash of the entered password.
'
Could you clarify for me how does it work in detail?





"Dave O." wrote:

If you are just trying to remove spaces from a string, this will do the
job
Replace(Text1.Text," ","")

Another point is that storing the passwords as clear text in the database
is
so insecure that it's so trivial to circumvent it's almost a joke.
You should create a non-reversible hash from the password, store that and
then compare it to the hash of the entered password.

As for spaces in a password, there is no real reason to exclude them from
inside a password, only exclude them from the start or end of the
password,
in which case Trim(Text1.Text) would remove any spaces fore & aft.

Regards
Dave O.

"Ruslan" <Ruslan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E09C61BB-0A8E-4072-981F-8990517CB210@xxxxxxxxxxxxxxxx
Please assist in solving the following problem.
In text1 field (max length is e.g. 20) User entered some password with
the
length e.g. 12.
AT the same time I have the list of all passwords in SQL database.
When VB checks text1 field with the database it compares ...
(123456..............) with (123456)
as a result it says that password is not correct.
Is there any way to omit blank spaces (..............) whenever they
appear
after an entered password in text1?







.



Relevant Pages

  • Re: How to omit blank spaces in the text?
    ... In this context a hash can be a number formed from the ASCII values of each ... character and the positions of each character, the idea is that you will get ... then it is almost certain the entered password is correct. ... then compare it to the hash of the entered password. ...
    (microsoft.public.vb.general.discussion)
  • Re: How to omit blank spaces in the text?
    ... you're best to read the characters one by one and ensure they are within a range you are happy with. ... "Dave O." ... When the password is first created you calculate the hash and store that, ... then it is almost certain the entered password is correct. ...
    (microsoft.public.vb.general.discussion)
  • Re: "index" efficiency... any help or ideas?
    ... > That's still a lot of checking; with a good hash, ... byte number of possibilities for character ... absolute jump address to the handler for that command... ... then the pointer is an offset relative to ...
    (alt.lang.asm)
  • Re: Help with Streams
    ... In particular, it's actually extremely inconvenient to maintain a mapping between the reader and stream positions, and doing so would perform very poorly in any case, because you would have to decode the bytes to characters one at a time. ... You could still buffer the stream data into a byte buffer, but even the overhead of having to call the encoder one character at time would be very noticeable. ... It'd probably be easier to just open the file twice and have my hash routine figure out where it needs to go. ... If it's the latter, then you could actually encode the search string itself into the bytes representing that string, and then scan the stream bytes for a matching sequence of bytes. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Password hashes
    ... There is no such thing as an NTLMV2 hash. ... While I am a believer of enforcing complex passwords the bigger issue is if ... computers you need to review the physical security of your computers. ... > broken up into two 7 character units. ...
    (microsoft.public.windowsxp.security_admin)