Android jna working

This commit is contained in:
Ugljesa Jovanovic committed 2021-02-21 11:40:16 +01:00
1 parent 8290586a12
commit 86cdc0da8f
14 files changed
+41 -21

No files matched your search

@@ -7,6 +7,7 @@ package com.ionspin.kotlin.crypto.sample
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.ionspin.kotlin.crypto.hash.Hash
import com.ionspin.kotlin.crypto.jnitest.JniTest
import com.ionspin.kotlin.crypto.util.encodeToUByteArray
import com.ionspin.kotlin.crypto.util.toHexString
import kotlinx.android.synthetic.main.activity_main.*
@@ -18,7 +19,7 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val hash = Hash.sha512("123".encodeToUByteArray())
helloWorldTextView.setText("Hash (SHA512) of 123: ${hash.toHexString()}")
helloWorldTextView.setText("Hash (SHA512) of 123: ${hash.toHexString()} \nSodium version: ${JniTest.work()}")
}