Creating an SHA1 Hash in a text-field from an imput text-field

jklaverjklaver Member Posts: 4
edited 2016-03-02 in NAV Three Tier
I have to convert i.e. 'QEX\JohnKwachtwoord' to 'abb4a8f6dbebdeb71f0f63f0cba7b8ee9e6cc67b'
I tried to use System.Security.Cryptography.HashAlgorithm.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
but that gives me an Uppercase text like: 1CEE2F310C53CCA7CA43527AC59CE23D29A088F2
Does anyone have a solution?

Answers

  • Jan_VeenendaalJan_Veenendaal Member Posts: 206
    edited 2016-03-02
    LOWERCASE(..) ?? [and: make sure that your text-field is not actually a Code field ;) ]
    Jan Veenendaal
  • jklaverjklaver Member Posts: 4
    edited 2016-03-02
    No Jan,
    I'm using a text field for my result.
    The result is completely different from the wanted result so LOWERCASE won't do the job.
  • EvREvR Member Posts: 178
    'QEX\JohnKwachtwoord' should result in a hex value of '8569db1611ef4f37d4b2f0eebeab42a17fc87751' and base64 'hWnbFhHvTzfUsvDuvqtCoX/Id1E='. If you get a different result, you're not hashing properly.

    Try posting your exacy c/al code here.
Sign In or Register to comment.