Product landing page integrity value

What is the integrity. integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d
Do I just copy that? I’ve been searching far and wide and I can’t get an answer as to how to generate that number or if its standard. I tried to inspect element for things and that didn’t work…

You might have to give more details…

I’m sure there is someone that knows more than me on this, but I think I’ve seen this in lock files like package-lock.json or yarn.lock:

"@babel/generator@^7.12.13", "@babel/generator@^7.5.0":
  version "7.12.15"
  resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.15.tgz#4617b5d0b25cc572474cc1aafee1edeaf9b5368f"
  integrity sha512-6F2xHxBiFXWNSGb7vyCUTBF8RCLY66rS0zEPcP8t/nQyXjha5EuK4z7H5o7fWG8B4M7y6mqVWq1J+1PuwRhecQ==
  dependencies:
    "@babel/types" "^7.12.13"
    jsesc "^2.5.1"
    source-map "^0.5.0"

Here, it appears to be some kind of hash, which I assume is being used as some kind of checksum - a way for your computer to make sure that that file hasn’t been tampered with. I’m just guessing here, but that makes sense to me.

Did you mean something else?

yes that’s what I mean. The code for landing page has it for font awesome. I was just wondering if I should copy it or create my own.

IC. I would copy it, I think. I think it’s how it confirms that the file is what it says it is.

1 Like

for future reference how do I replicate this

Replicate what, exactly?

You can’t replicate it or generate your own, you have to use the string that comes with the package. It’s created by the author, and serves as a signature, to make sure that you’re using the original package. Kind of what @kevinSmith already said.

If you use codepen for your projects, you won’t need it anyway, you can go to the CSS settings (the cogwheel in the upper left) and then under “Add External Stylesheets/Pens”, search for “fontawesome”.

2 Likes

If I wanted to use font awesome or something similar where would I find what the integrity is?

Thank you, noted for future reference

If it provides one, use it. If it doesn’t don’t. Are you running into problems where it is not working?

No I haven’t run into problems. I just want to understand as much as possible rather than copying. I get the concept of it checking item is still there. Thank you for troubleshooting with me so far

Sure, it’s a good question.

You may want to look up what hashing is. But what I’m assuming is happening here is that the creator created a hash of their file so they send that along so the end users’ program can see if they get the same hash - if they match, then everything is OK. If they don’t, then the file was tampered with or is corrupt. A similar thing is down with passwords - it doesn’t store your password but its hash. It hashes what you send to see if the hashes match. Since these are one way hashes, it is nearly impossible (without a few acres of super computers and many million years) to figure out the password.

I’m just guessing here, but that’s how I thought of it.

It’s a good question, but don’t worry about it. I have never had to create an integrity hash. I usually just ignore them and let them do their jobs, when they are there.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.