iambenn / iroha-android

Android library for Iroha, a Distributed Ledger Technology (blockchain) platform.

Home Page:http://iroha.tech/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iroha-android

build status Codacy Badge

What is いろは(iroha)?

いろは(iroha) is this.

Description

いろはAndroid(IrohaAndroid) is client library for using いろは(iroha) for Android.

Requirement

  • Android Studio >=2.2.1
  • Android API Level >=v19 (v4.4, KitKat)
  • Android Build Tools >=v25

Installation

Gradle

In your app/build.gradle

compile 'org.hyperledger:iroha-android:1.4.0'

Maven

Or if you use Maven, like this

<dependency>
  <groupId>org.hyperledger</groupId>
  <artifactId>iroha-android</artifactId>
  <version>1.4.0</version>
  <type>pom</type>
</dependency>

Usage

API

io.soramitsu.irohaandroid.security.MessageDigest

digest

String hashedMessage = MessageDigest.digest("message", MessageDigest.SHA3_256);
// ===> hashed message by SHA3_256

io.soramitsu.irohaandroid.Iroha

createKeyPair

import io.soramitsu.irohaandroid.Iroha;
import io.soramitsu.irohaandroid.model.KeyPair;

KeyPair keypair = Iroha.createKeyPair();
keypair.publicKey; // Ed25519 public key encoded by base64
keypair.privateKey; // Ed25519 private key encoded by base64

sign

import io.soramitsu.irohaandroid.Iroha;
import io.soramitsu.irohaandroid.model.KeyPair;

String signature = Iroha.sign(keyPair, "message")
//===> signature // String

verify

import io.soramitsu.irohaandroid.Iroha;
import io.soramitsu.irohaandroid.model.KeyPair;

boolean verify = Iroha.verify(keyPair.publicKey, signature, "message")
//===> true if the correct message

Web API

Sorry, This API has been removed.

Author

kobaken0029

http://soramitsu.co.jp

License

Copyright 2016 Soramitsu Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Android library for Iroha, a Distributed Ledger Technology (blockchain) platform.

http://iroha.tech/

License:Other


Languages

Language:Java 44.6%Language:C 26.4%Language:Objective-C 25.1%Language:C++ 3.2%Language:CMake 0.5%Language:Makefile 0.2%