Skip to main content

Notifications

Microsoft Dynamics NAV forum
Answered

Encrypt a string in navision

Posted on by 3,027

Hi

  How to encrypt a string in Navision and then pass it as parameter and then decrypt in c#

Thanks

  • Simone Colombo Profile Picture
    Simone Colombo 60 on at
    RE: Encrypt a string in navision

    Hello Hannes,

    If I encrypt my parameter with your code in C/AL next how can I decrypt it in C#?

    Thanks,

    Simone

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: Encrypt a string in navision

    Hi

     But how i will decrypt in c#

    Thanks

  • Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: Encrypt a string in navision

    HI,

    Yes - Encryption Management is an alternative. Just bear in mind that you have to activate Encryption for the whole application to be able to use this Codeunit.

    This might create problems in other areas.

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: Encrypt a string in navision

    Hi Stefano

     There is 824 Codeunit . But how i will decrypt in c#.

    Secondly the no of encryption characters is very large

    Thanks

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,160 Most Valuable Professional on at
    RE: Encrypt a string in navision

    if you want native C/AL, there's the Encryption Mangement codeunit that has native functions for encrypting and decrypting data in NAV. If you're on old versions, you don't have this codeunit and you should reference assembiels like in the before suggested post.

  • Verified answer
    Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: Encrypt a string in navision

    Hello,

    This could be done in various ways.

    One way could be to encrypt using SHA. I've described the part in NAV here:

    www.hannesholst.com/.../hash-hash-baby-secure-hash-algorithm-in-nav-365bc-and-a-little-more

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans