Code Monkey home page Code Monkey logo

Comments (5)

horeaporutiu avatar horeaporutiu commented on August 24, 2024

@pratiksharma1619 Thanks for opening this. I will look into this and get back to you.

from blockchainbean.

pratiksharma1619 avatar pratiksharma1619 commented on August 24, 2024

@horeaporutiu Can Base64 encoding of the image file be a solution for it? What would be its pros and cons if implemented?

from blockchainbean.

0xthreebody avatar 0xthreebody commented on August 24, 2024

@pratiksharma1619 upload the image to IPFS, post the Hash to blockchain. Note: need to let the IPFS dont delete the file, such as use the "pin" method.

from blockchainbean.

horeaporutiu avatar horeaporutiu commented on August 24, 2024

@jiangfuyao Thanks for the comment. Really good solution.

@pratiksharma1619 Don't think you should use Base64 encoding since you can decode the image. With hashing, you can preserve the integrity of the data, and nobody will know what sort of data is behind the hash.

I have never used IPFS, but seems like it could be a nice solution. Just simply create a field within /submitFairTradeData for documentHash and then just get the hash of the document, and update that field :)

from blockchainbean.

horeaporutiu avatar horeaporutiu commented on August 24, 2024

@pratiksharma1619 This is a good post about the difference between base64 encoding and hashing: https://stackoverflow.com/questions/25058207/what-is-the-main-difference-between-base64-encode-hashing-and-sha1-md5

from blockchainbean.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.