i would know about hashing sha1

gorvega79gorvega79 Member Posts: 73
Hello i can´t found anything about the sha1 codification, if you know forums or webs where explain something about this please tell me. thank you so much

Answers

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • gorvega79gorvega79 Member Posts: 73
    to search something in google is very easy, even for me. but is not easy when you search about hashing in navision, my post is only about hashing in navision , and there is not much information about this in google. for the next time i´ll be more careful about my posts.

    thank you =D>
  • ta5ta5 Member Posts: 1,164
    Hi
    A while ago I had to interact with a webservice using nav. The pw and user name had to be transmitted encoded with sha1. I used then "Encoder Wizard ActiveX 3.0" written by the Seekford company. I used the Encoder Wizard as an automation server, that worked like a charm. Please note, the software is not free, but quite affordable.

    Hope this helps.
    Thomas
  • gorvega79gorvega79 Member Posts: 73
    thank you thomas for your reply, that´s what i needed. thanks again
  • gorvega79gorvega79 Member Posts: 73
    finally i have done a little c sharp aplication like this and create an automation control with it,works perfectly

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Security.Cryptography;
    using System.Runtime.InteropServices;


    namespace sha1Codificacion
    {
    public class Sha1Codificacion
    {
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface INTServiciosPrb
    {
    string calcular(string text);
    }

    [ClassInterface(ClassInterfaceType.None)]
    public class sha1Codificacion : INTServiciosPrb
    {
    public sha1Codificacion()
    {

    }

    public string calcular(string text)
    {
    string TextoCodificado;
    HashAlgorithm sha1 = HashAlgorithm.Create("SHA1");
    Byte[] sha1Data = sha1.ComputeHash(UTF8Encoding.UTF8.GetBytes(text));
    TextoCodificado = BitConverter.ToString(sha1Data).Replace("-", "");
    return TextoCodificado;
    }
    }
    }
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Thanks for sharing the code. This is the real community spirit. =D>
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • gorvega79gorvega79 Member Posts: 73
    thank you so much luc for your comment.

    :D
Sign In or Register to comment.