Watermark your data with hash values in AL and Business Central

Ғылым және технология

Find more information at my blog www.hougaard.com or follow me on / ehougaard
Source code can be found here: github.com/hougaard/KZread-V...

Пікірлер: 23

  • @antoniocheca3787
    @antoniocheca37873 жыл бұрын

    Great video Erik, thank you. I wish you could make a new one explaining de differences between Debug&Publish no debug&no publish... and so on... also on attaching to session or the brand new way to debug production. Thanks!

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    Great suggestion!

  • @RaiBilalHaider
    @RaiBilalHaider Жыл бұрын

    Thanks for sharing knowledge. For symmetric Encryption I found enough functions in Business Central but can you share if there is some support available for Asymmetric Encryption in Business Central.

  • @guidorobben6259
    @guidorobben62593 жыл бұрын

    Nice one.

  • @hariskorac419
    @hariskorac4192 жыл бұрын

    Hi Erik, I wanted to ask you is maybe possible to sign data with RSASignaturePadding like in RSA dotnet (SignData method - SignData(Stream,HashAlgorithmName,RSASignaturePadding)), but without dotnet? I tried to find into Cryptography Management codeunit but there only have SignData methods without RSASignaturePadding. Thank you.

  • @Hougaard

    @Hougaard

    2 жыл бұрын

    Sorry, no :(

  • 3 жыл бұрын

    Great Erik. And why not sending only the base64 hasted text instead the file with your accounts and the watermark? As you can decrypt it. Can't you?

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    Base64 is not encryption, just a data packing format.

  • 3 жыл бұрын

    @@Hougaard No. I meant encripted + base64 so the text is sorter.

  • @Dyulz
    @Dyulz2 жыл бұрын

    More crypto videos please. Encrypt/decrypt/digital signature/hash. Thank you for sharing

  • @jackpeterson480
    @jackpeterson4803 жыл бұрын

    Another video on this please!

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    What specifically do you want to do?

  • @jackpeterson480

    @jackpeterson480

    3 жыл бұрын

    @@Hougaard you mentioned if we want to go deeper into cryptography and hashing to let you know in this one

  • @dividuttnamboodiri3283
    @dividuttnamboodiri3283 Жыл бұрын

    want to encrypt data. any ideas? please can you do video on encryption with ex.

  • @Hougaard

    @Hougaard

    Жыл бұрын

    There's also a encryption codeunit...

  • @dividuttnamboodiri3283

    @dividuttnamboodiri3283

    Жыл бұрын

    @@Hougaard Hey Thanks for replying but can you suggest which will be the proper method.

  • @chriswatson2407
    @chriswatson24073 жыл бұрын

    You have inspired me to reverse engineer ROT13

  • @Hougaard

    @Hougaard

    3 жыл бұрын

    Go for it!

  • @YannSaintLaurent
    @YannSaintLaurent3 жыл бұрын

    Please… more crypto

  • @FrancescoLanza
    @FrancescoLanza Жыл бұрын

    I have an issue with cryptography management in BC. Scenario: I got an instream data with the pdf of an invoice. Nice. the code is something like this: SalesInvoiceHeader2.get(SalesInvoiceHeader."No."); RecRef.GetTable(SalesInvoiceHeader2); RecRef.SetRecFilter(); TempBlob.CreateOutStream(OutStream); REPORT.SaveAs(gRecSelection."Report ID", '', ReportFormat::Pdf, OutStream, RecRef); TempBlob.CreateInStream(InStream); HashValue := CU_CryptographyMgmt.GenerateHash(Instream, Algorithm::SHA256); I don't understand why, every time i execute the code (generating the Instream every time with the same sales invoice header No.) i got a different hash value. If I dowload the stream as file and i check the hash with an online tool, I got the correct hash, and I never get that hash using AL.

  • @Hougaard

    @Hougaard

    Жыл бұрын

    I believe there is a time stamp in the pdf, so you're generating a new pdf every time with report.saveas

  • @danieloton8455
    @danieloton84559 ай бұрын

    Hi Erik, thanks for your videos. I'm trying to generate a signature for AWS Signing 4 auth api. For AWS you creating a signing key via the following (HMAC function param. is (Key, Value): kSecret = your secret access key kDate = HMAC(“AWS4” + kSecret, Date) kRegion = HMAC(kDate, Region) kService = HMAC(kRegion, Service) kSigning = HMAC(kService, “aws4_request”) Translated to AL: KDate := CryptographyManagement.GenerateHash(SignDate, Secret, HashAlgorithmType::HMACSHA256); KRegion := CryptographyManagement.GenerateHash(Region, KDate, HashAlgorithmType::HMACSHA256); KService := CryptographyManagement.GenerateHash(Service, KRegion, HashAlgorithmType::HMACSHA256); KSigning := CryptographyManagement.GenerateHash(Signing, KService, HashAlgorithmType::HMACSHA256); KDates gets the right return result, but this has been converted into a string rather than the Byte array required in the next call. When I call the next function to get “KRegion”, I get the incorrect result. I've tried using GenerateBase64KeyedHashAsBase64String instead of GenerateHash but get the same signature mismatch error. A NAV2018 version using DotNet works ok: HmacSHA256(Encoding.UTF8.GetBytes('AWS4' + secretKey), Date,kDate); HmacSHA256(dateKey, awsRegion,kRegion); HmacSHA256(dateRegionKey, awsServiceName,kService); HmacSHA256(dateRegionServiceKey, 'aws4_request',kSigning); Is there a way to obtain the result of GenerateHash as Byte array? Perhaps the only way would be using an Azure Function? Any help would be appreciated, I'm a bit frustrated with this... Thanks

  • @Hougaard

    @Hougaard

    9 ай бұрын

    Check this kzread.info/dash/bejne/hmqj3NmplJbXmco.html plus this kzread.info/dash/bejne/f5yusq6OXcLdZZc.html I would try to build a stream with the binary data, you can pass streams to generatehash.

Келесі