πŸ¦€πŸ¦€ High performance Crypto library of Rust implementation for Flutter

Overview

pub package GitHub GitHub top language GitHub language count

r_crypto

Rust backend support crypto flutter library, much faster than Dart-implementation library, light-weight library.

Some crypto support hardware accelerate.

Support Algorithm

Hashes

  • MD5
  • SHA1
  • SHA2
    • SHA224
    • SHA256
    • SHA384
    • SHA512-trunc224
    • SHA512-trunc256
  • SHA3
    • SHA3-224
    • SHA3-256
    • SHA3-384
    • SHA3-512
    • SHAKE-128
    • SHAKE-256
    • KECCAK224
    • KECCAK256
    • KECCAK384
    • KECCAK512
  • Whirlpool
  • Blake2
    • Blake2b
    • Blake2s
  • Blake3
  • Groestl
    • Groestl224
    • Groestl256
    • Groestl384
    • Groestl512
    • GroestlBig
    • GroestlSmall
  • RIPEMD160 (RIPEMD-320 provides only the same security as RIPEMD-160)
  • Shabal
    • Shabal192
    • Shabal224
    • Shabal256
    • Shabal384
    • Shabal512

More digest will support soon.

Support Platform

  • Android
    • arm64-v8a
    • armeabi-v7a
    • x86
    • x86_64
  • iOS
    • arm64
    • x86_64
  • macOS
    • x86_64
    • arm64(WIP)
  • Windows
    • x86_64
    • x86(Not support now and feature)
  • Linux
    • x86_64

Example Usage

Hash

import 'package:r_crypto/r_crypto.dart';

// For fixed output length digest
rHash.hashString(HashType.MD5, input);
// For dynamic output length digest
rHash.hashString(HashType.blake3(length: 64), input);
// Also accept List<int> as parameter
rHash.hashList(HashType.KECCAK_224, [0,1,2]);
// Hash File
rHash.filePath(HashType.blake3(length: 32), path);

// Encode the list
hex.encode(list);

Note

  • Windows user needs to download the rcrypto.dll and put it in the same folder with *.exe. It's the limitation of the Flutter Windows Plugin now.

TODO

  • Support file input
  • Support encrypt/decrypt algorithm
You might also like...

Ruqe brings the convenient types and methods found in Rust into Dart, such as the Result, Option, pattern-matching, etc.

ruqe Ruqe brings the convenient types and methods found in Rust into Dart, such as the Result, Option, pattern-matching, etc. Additionally, the librar

Dec 28, 2022

AI Library to create efficient Artificial Neural Networks. Computation uses SIMD (Single Instruction Multiple Data) to improve performance.

eneural_net eNeural.net / Dart is an AI Library for efficient Artificial Neural Networks. The library is portable (native, JS/Web, Flutter) and the co

Dec 29, 2022

A super effective dart library delivering performance & ensuring greater build speed.

A super effective dart library delivering performance & ensuring greater build speed.

A super effective Dart and Flutter library for delivering performante app 🌝 & ensuring greater build speed πŸš€ . The package has some cook utilizes wh

Nov 22, 2021

A UI-based redesign of my high school's grade distribution app.

flutter_powerschool A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you

Oct 25, 2022

TRTCFlutterDemo - With TRTC, you can quickly develop cost-effective, low-latency, and high-quality interactive audio/video services

TRTCFlutterDemo - With TRTC, you can quickly develop cost-effective, low-latency, and high-quality interactive audio/video services

This document describes how to quickly run the TRTC demo for Flutter. Environmen

Feb 10, 2022

Get It - Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App. Maintainer: @escamoteur

Get It - Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App. Maintainer: @escamoteur

❀️ Sponsor get_it This is a simple Service Locator for Dart and Flutter projects with some additional goodies highly inspired by Splat. It can be used

Jan 1, 2023

Flutter preferences management with crypto capabilities

crypted_preferences Flutter preferences management with crypto capabilities For now preferences are not crypted, I'm waiting for FFI to land :) But yo

Jan 14, 2020

Crypto Loss Gain Calculator App build with Flutter. It developed with DDD (Domain Driven Design) principles.

Crypto Loss Gain Calculator App build with Flutter. It developed with DDD (Domain Driven Design) principles.

Crypto Loss Gain Calculator Crypto Loss Gain Calculator App build with Flutter. It developed with DDD (Domain Driven Design) principles. Domain-Driven

Dec 27, 2022

A sample app to showcase Crypto Wallet App UI demo in flutter.

A sample app to showcase Crypto Wallet App UI demo in flutter.

Flutter-Crypto-Wallet-App A sample app to showcase Crypto Wallet App UI demo in flutter. Development Setup Clone the repository and run the following

Dec 14, 2022
Comments
  • Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, rust_cstr_free): symbol not found)

    Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, rust_cstr_free): symbol not found)

    Code below work fine on iOS simulator and Android devices, but throw exception on iOS devices.

    var ret = rHash.filePath(HashType.SHA3_224, path);
    

    The stack is

    [VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, rust_cstr_free): symbol not found)
    #0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:31)
    #1      _Loader.freeCString (package:r_crypto/src/basic/loader.dart)
    package:r_crypto/…/basic/loader.dart:1
    #2      _GrowableList.forEach (dart:core-patch/growable_array.dart)
    #3      _Loader.freeCStrings (package:r_crypto/src/basic/loader.dart:72)
    #4      _Hash.filePath (package:r_crypto/src/hash.dart:142)
    #5      ObjectNameGenerator.getKey (package:aliyun_oss/src/name_generator.dart:10)
    #6      ObjectNameGenerator.getName (package:aliyun_oss/src/name_generator.dart:33)
    #7      AliyunOss.getObjectName (package:aliyun_oss/src/aliyun_oss.dart:345)
    #8      _MessageSessionDetailPageState._uploadFile (package:flutter_yuanling_app/message_module/view/message_session_detail_page.dart:1391)
    #9      _MessageSessionDetailPageState._buildChatInput.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:flutter_yuanling_app/message_module/view/message_session_detail_page.dart:712)
    <asynchronous suspension>
    
    
    opened by mikeooye 3
  • Integrate non-cryptographic hashes from rust-fasthash

    Integrate non-cryptographic hashes from rust-fasthash

    There's another Rust project for hashes called fasthash, which implements a bunch of modern non-cryptographic hashing algorithms, like xxHash and meowhash.

    It would be great if this library also supported those hashes! It looks like fasthash also supports the Digest trait, which I think this library relies on?

    opened by jonjomckay 1
Owner
Tino
Android Engineer, Flutter follower, Rust Beginner, OpenWrt
Tino
Flutter project that shows how to work with ObjectBox - High Performance NoSQL Database.

Flutter ObjectBox Example Flutter project that shows how to work with ObjectBox - High Performance NoSQL Database. This project shows - how to persist

Sandip Pramanik 6 Nov 1, 2022
Buy me crypto coffee - A Flutter package that helps you to integrate Buy me a crypto coffee widget in flutter

Buy me a crypto coffee Features A Flutter package that helps you to integrate Bu

Anto Tom Abraham 2 Nov 25, 2022
Crypto-currency - A Flutter application showing crypto currency rates

Features Crypto Currency rates This application allows to view crypto currency rates from Coin Market Cap. Getting started Get an API key at Coin Mark

Karol Lisiewicz 16 Oct 26, 2022
Crypto-App - Crypto App Using Flutter and Firebase

Crypto App Technologies and tools used in practice: Flutter library in the Dart

Kushal Shingote 2 Nov 14, 2022
ITS A SIMPLE CRYPTO APP THAT GIVES OR DISPLAYS PRICES - %CHANGE AND CHANGE VALUE OF TICKER (VARIOUS CRYPTO ASSERTS)

btcpricetracker A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

jatin upadhyay 0 Dec 28, 2021
A cryptocurrency, crypto-currency, or crypto is a digital currency designed to work as a medium of exchange through a computer network that is not reliant on any central authority

?? Crypto Trackers ?? Crypto Currency ?? A cryptocurrency, crypto-currency, or crypto is a digital currency designed to work as a medium of exchange t

Prashant Kumar Singh 10 Dec 3, 2022
A cryptocurrency, crypto-currency, or crypto is a digital currency designed to work as a medium of exchange through a computer network that is not reliant on any central authority

A cryptocurrency, crypto-currency, or crypto is a digital currency designed to work as a medium of exchange through a computer network that is not reliant on any central authority

Prashant Kumar Singh 10 Dec 3, 2022
Binding and high-level wrapper on top of libssh - The SSH library!

Dart Binding to libssh version 0.9.6 binding and high-level wrapper on top of libssh - The SSH library! libssh is a multiplatform C library implementi

Isaque Neves 2 Dec 20, 2021
Starter project for Flutter plugins willing to access native and synchronous rust code using FFI

Flutter Rust FFI Template This project is a Flutter Plugin template. It provides out-of-the box support for cross-compiling native Rust code for all a

JΓΈrβˆ‚Β‘ 561 Dec 7, 2022
LanChat fluter + rust demo

LanChat Flutter + Rust demo showcasing how simple the integration is! Usage ./run It requires cargo and flutter correctly configured. Info Simple exam

null 11 Oct 31, 2022