CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    Join Date
    May 2012
    Posts
    26

    Re: Administrator Privileges

    or if its possible, converge parts of code from the already known encryption technics and make a mixed one along with a touch of your own imagination
    btw..ive tried to use encryption once and i saw that when you call the decryption function before encrypt it encrypts in another way..this could be an idea to a diferent encryptation code...inverting it with the same parameters :s dunno...gotta go sleep
    Last edited by alienoiz; May 23rd, 2012 at 04:09 AM.

  2. #17
    Join Date
    May 2012
    Posts
    26

    Re: Administrator Privileges

    hi,..its to say thank you..i solved my prob..changed the keys into local machine hive..it works perfectly...i just dont understand why it create the key in a subkey called virtual store and not in the "main" key...i hope this is no problem..i mean this virtual store subkey will not be deleted after a while will be?

    Thx!

    Duarte V.

  3. #18
    Join Date
    May 2012
    Posts
    26

    Re: Administrator Privileges

    hi...ive been wondering if we can get back again with the convo but now with another question....
    if possible can you tell me how do i split a username into hex? like...i know that using
    Code:
    x = hex(asc(n))
    converts my "n" into hex but who do i split my name for eg: Duarte ... make "Dua" one part of an hex and "rte" another part so i can have 2 codes like HF08-ADF7 for eg.
    Can you help me?....
    Thanks!

    Duarte V.

  4. #19
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Administrator Privileges

    You could make a loop and go through all characters of a string. Example:
    Code:
      dim i$, o$, n%
      i$ = "ZYXWVU"
      For n = 1 To Len(i$)
        o$ = o$ + Right$("0" + Hex$(Asc(Mid$(i$, n, 1))), 2)
      Next
    The Mid$(i$, n, 1) picks one character out of the string with each pass of the loop.
    The Right$("0" + Hex(...) ,2) is a trick to make sure you will always get a 2 digit hex number for each character. Otherwise reconversion would become difficult.
    The hex result of the above example (ZYXWVU) would be "5A5958575655"

  5. #20
    Join Date
    May 2012
    Posts
    26

    Re: Administrator Privileges

    Quote Originally Posted by WoF View Post
    You could make a loop and go through all characters of a string. Example:
    Code:
      dim i$, o$, n%
      i$ = "ZYXWVU"
      For n = 1 To Len(i$)
        o$ = o$ + Right$("0" + Hex$(Asc(Mid$(i$, n, 1))), 2)
      Next
    The Mid$(i$, n, 1) picks one character out of the string with each pass of the loop.
    The Right$("0" + Hex(...) ,2) is a trick to make sure you will always get a 2 digit hex number for each character. Otherwise reconversion would become difficult.
    The hex result of the above example (ZYXWVU) would be "5A5958575655"
    soory i cant get it ..this is my code
    Code:
    st9 = Username.Text
    st10 = Hex(Base * Asc(st9))
    Label8.Caption = st10
    how do i fit your code in here????

    should it be like this
    Code:
    st10 = Hex(Base * Asc(st9))
      i$ = st10
      For n = 1 To Len(i$)
        o$ = o$ + Right$("0" + Hex$(Asc(Mid$(i$, n, 1))), 2)
      Next
    Much Thanks!
    Last edited by alienoiz; May 29th, 2012 at 07:50 AM.

  6. #21
    Join Date
    May 2012
    Posts
    26

    Re: Administrator Privileges

    ok..i got it..thanks WoF .. much pleasure to meet you

    Duarte Vinagre

  7. #22
    Join Date
    May 2012
    Posts
    26

    Re: Administrator Privileges

    my friend... this gives me a very big number for my name (for eg..i can see when i take a letter it decreases 2 values on the hex, but how do i divide it make it a bit smaller? ...sorry..like i said before i code an app from 5 to 5 years and i normaly only use tutorials and stuff. :S

    Thanks!

    Duarte V.

  8. #23
    Join Date
    May 2012
    Posts
    26

    Re: Administrator Privileges

    ok i got in n = n +1, 2, 3 etc

  9. #24
    Join Date
    May 2012
    Posts
    26

    Re: Administrator Privileges

    Quote Originally Posted by WoF View Post
    You could make a loop and go through all characters of a string. Example:
    Code:
      dim i$, o$, n%
      i$ = "ZYXWVU"
      For n = 1 To Len(i$)
        o$ = o$ + Right$("0" + Hex$(Asc(Mid$(i$, n, 1))), 2)
      Next
    The Mid$(i$, n, 1) picks one character out of the string with each pass of the loop.
    The Right$("0" + Hex(...) ,2) is a trick to make sure you will always get a 2 digit hex number for each character. Otherwise reconversion would become difficult.
    The hex result of the above example (ZYXWVU) would be "5A5958575655"
    WoF are you still there? i would like to ask you if its possible to convert the entire Sid number into an Hex value..ive been trying with this piece of code you gave me but im not doing it right...i would like some help if possible...Thanks!

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured