opensystemslab / hmac.nim Goto Github PK
View Code? Open in Web Editor NEWHMAC-SHA1 and HMAC-MD5 hashing in Nim
License: MIT License
HMAC-SHA1 and HMAC-MD5 hashing in Nim
License: MIT License
stmt
is not supported anymore - can you please release a new version? Thanks
Because it conflicts with json
std module.
Sample:
import json, hmac
echo %*{ "hi": 0 }
test.nim(2, 6) template/generic instantiation from here
.nimble/pkgs/hmac-0.1.3/hmac.nim(40, 26) Error: type mismatch: got (int)
but expected one of:
proc toHex(sha: SHA224Digest): string
proc toHex(sha: SHA256Digest): string
proc toHex(sha: SHA384Digest): string
proc toHex(sha: SHA512Digest): string
I see that legacy stmt
issue has been fixed to use typed
but 0.1.5 is stuck with stmt.
Thanks :)
The lib no longer compiles with nim devel, because securehash is gone. There is an alternative https://github.com/onionhammer/sha1
de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9
a0d87be75bb531af746ab7988e1e8058e7bc17f0
F53ABED8001D0B7C8A64EDC011854BDED49E1ED55E5D5F5455B7B2ECF6506884
hmac.nim(87) hmac
system.nim(3778) failedAssertImpl
system.nim(3771) raiseAssert
system.nim(2833) sysFatal
Error: unhandled exception: result == "f53abed8001d0b7c8a64edc011854bded49e1ed55e5d5f5455b7b2ecf6506884" Incorrect hash [AssertionError]
Error: execution of an external program failed: '/Users/federico/Documents/GitHub/hmac.nim/hmac '
The toHex()
proc doesn't seem to work.
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.