All Projects → JuliaCrypto → SHA.jl

JuliaCrypto / SHA.jl

Licence: other
A performant, 100% native-julia SHA1, SHA2, and SHA3 implementation

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to SHA.jl

hash-wasm
Lightning fast hash functions using hand-tuned WebAssembly binaries
Stars: ✭ 382 (+991.43%)
Mutual labels:  sha1, sha3
Cryptography-Guidelines
Guidance on implementing cryptography as a developer.
Stars: ✭ 15 (-57.14%)
Mutual labels:  sha2, sha3
Cryptoswift
CryptoSwift is a growing collection of standard and secure cryptographic algorithms implemented in Swift
Stars: ✭ 8,846 (+25174.29%)
Mutual labels:  sha1, sha3
Jsrsasign
The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES JSON Web Signature/Token in pure JavaScript.
Stars: ✭ 2,760 (+7785.71%)
Mutual labels:  sha2, sha1
rvkrypto-fips
FIPS and higher-level algorithm tests for RISC-V Crypto Extension
Stars: ✭ 18 (-48.57%)
Mutual labels:  sha2, sha3
iroha-ed25519
RFC8032 compatible Ed25519 implementation with pluggable hash (sha2-512, sha3-512)
Stars: ✭ 28 (-20%)
Mutual labels:  sha2, sha3
BruteForce
A simple brute forcer written in GO for SHA1, SHA256, SHA512, MD5 and bcrypt
Stars: ✭ 49 (+40%)
Mutual labels:  sha1
angular-crypto
angular-crypto provides standard and secure cryptographic algorithms for Angular.js with support for: MD5, SHA-1, SHA-256, RC4, Rabbit, AES, DES, PBKDF2, HMAC, OFB, CFB, CTR, CBC, Base64
Stars: ✭ 30 (-14.29%)
Mutual labels:  sha1
PwnedPasswordsChecker
Search (offline) if your password (NTLM or SHA1 format) has been leaked (HIBP passwords list v8)
Stars: ✭ 52 (+48.57%)
Mutual labels:  sha1
LibSWIFFT
LibSWIFFT - A fast C/C++ library for the SWIFFT secure homomorphic hash function
Stars: ✭ 23 (-34.29%)
Mutual labels:  hash-functions
hash-checker
Fast and simple application that allows you to generate and compare hashes from files and text
Stars: ✭ 72 (+105.71%)
Mutual labels:  sha1
XXHash
XXHash - Extremely fast hash algorithm,impl for csharp,can process 11.8 GB/s on modern cpu. impl with net core 2.0 and .net
Stars: ✭ 24 (-31.43%)
Mutual labels:  hash-functions
fhash
fHash - an open source files hash calculator for Windows and macOS
Stars: ✭ 222 (+534.29%)
Mutual labels:  sha1
triehash
Generator for order-preserving minimal perfect hash functions in C
Stars: ✭ 36 (+2.86%)
Mutual labels:  hash-functions
prvhash
PRVHASH - Pseudo-Random-Value Hash. Hash functions, PRNG with unlimited period, randomness extractor. (Codename Gradilac/Градилак)
Stars: ✭ 194 (+454.29%)
Mutual labels:  hash-functions
crypto-primitives
Interfaces and implementations of cryptographic primitives, along with R1CS constraints for them
Stars: ✭ 76 (+117.14%)
Mutual labels:  hash-functions
WebCrypto.swift
A small collection of cryptographic functions based on the JavaScript WebCrypto API.
Stars: ✭ 16 (-54.29%)
Mutual labels:  sha1
node-express-reddit-clone
Build a Node, Express and MySQL-based clone of Reddit for DecodeMTL web development bootcamp
Stars: ✭ 28 (-20%)
Mutual labels:  hash-functions
nthash
ntHash implementation in Rust
Stars: ✭ 26 (-25.71%)
Mutual labels:  hash-functions
pysha2
Pure Python implementation of SHA2 (i.e., SHA224, SHA256, SHA384, and SHA512).
Stars: ✭ 52 (+48.57%)
Mutual labels:  sha2

SHA

Build Status codecov.io

Setup

Enter the Julia package manager by typing ] into your REPL. Then type:

(@v1.6) pkg> add SHA

Usage

julia> using SHA

julia> bytes2hex(sha256("test"))
"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"

Each exported function (at the time of this writing, SHA-1, SHA-2 224, 256, 384 and 512, and SHA-3 224, 256, 384 and 512 functions are implemented) takes in either an Array{UInt8}, a ByteString or an IO object. This makes it trivial to checksum a file:

shell> cat /tmp/test.txt
test
julia> using SHA

julia> open("/tmp/test.txt") do f
           sha2_256(f)
       end
32-element Array{UInt8,1}:
 0x9f
 0x86
 0xd0
 0x81
 0x88
 0x4c
 0x7d
 0x650x5d
 0x6c
 0x15
 0xb0
 0xf0
 0x0a
 0x08

Note the lack of a newline at the end of /tmp/text.txt. Julia automatically inserts a newline before the julia> prompt.

Due to the colloquial usage of sha256 to refer to sha2_256, convenience functions are provided, mapping shaxxx() function calls to sha2_xxx(). For SHA-3, no such colloquialisms exist and the user must use the full sha3_xxx() names.

shaxxx() takes AbstractString and array-like objects (NTuple and Array) with elements of type UInt8.

Note that, at the time of this writing, the SHA3 code is not optimized, and as such is roughly an order of magnitude slower than SHA2. Pull requests are welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].