Git Product home page Git Product logo

cw-lua's People

Contributors

catwell avatar starius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cw-lua's Issues

SHA-256, Intel Core2Duo, XPSP3 x86, lua 5.1.5 + luajit 2.1 from Far 3.0.5843

Command line Far:>lua:local sha=require'sha256' print(sha.hex("abc"))
result: 0000000000000000000000000000000000000000000000000000000000000000
this result returned for any input data, sha256.test.lua don't work.

This variant SHA-256 https://github.com/Egor-Skriptunoff/pure_lua_SHA work ok, like other SHA-256 algorithms.
lua:local sha=require'sha2' print(sha.sha256("abc"))
result: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Is it possible to fix your sha256 code and make it as fast as possible for Far?

SHA256 implementation doesn't work correctly on 32-bit LuaJIT (x86)

The module sha256.lua doesn't work correctly on 32-bit LuaJIT.

-- This program prints 3 different lines when run on LuaJIT for x86
-- On some systems, the first line contains correct value of hash,
-- but the second line is never correct.
local sha256 = require"sha256".hex
print(sha256("abc"))
print(sha256("abc"))
print(sha256("abc"))

Tested on Windows and Linux, on LuaJIT 2.0 and 2.1
always OK on LuaJIT x64,
wrong results on LuaJIT x86.

Another implementation of SHA256 for LuaJIT + FFI (https://stackoverflow.com/a/19988581/6834680) has the same problem.
Is this a LuaJIT bug?

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.