gistya / lsl-hmac-sha1-fast Goto Github PK
View Code? Open in Web Editor NEWFast LSL HMAC-SHA1 with global pads
Fast LSL HMAC-SHA1 with global pads
It states in the readme that "This has been tested to work.", yet I can't seem to generate an HMAC hash that matches existing generators.
I used this to test the output with the message digest set to SHA1. The secret key I'm using is de5868364551a577acc1ed9e276ce7a7
the test message is Hello, Avatar!
.
The website indicates that the HMAC will be f2299a4d48b89817ab87d84fb2b2ad3c60980ad7
but this script is giving me 7urZ3pGzQOVFOns1HixWiWnjtm0
a completely different length and hash all together.
Now I noticed the script says "length = 40 GET FROM READER SCRIPT/NOTECARD" but I haven't found an HMAC hashing function that can't take a variable length, even the website I used indicates "This [secret] key will vary in length depending on the algorithm that you use.".
Regardless, I tried padding the key until it was 40 chars long and tested again. Still it generated a completely different hash than the site. I even compared using a php, java, and python HMAC hashing function set to SHA1 and they all matched the sites hash but this script doesn't seem to.
Am I doing something wrong to get these different results?
Also since SHA1 is prone to length extension attacks and had the first public collision published on 2/23/2017, will you ever make a 256 version? Even certain frameworks I use won't allow HMAC signing with SHA1 for security reasons. So this would be beneficial to have at some point for many people.
Caveat: The script doesn't compile because "skey=YOURSECRETKEYHERE" needs the quotes escaped. The A
variable doesn't get defined anywhere even though the dataserver
event loads it. Also, in the 4 years this script has been up llXorBase64StringsCorrect
was deprecated for llXorBase64
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.