java - android 如何进行 native 加密解码

查看:415
本文介绍了java - android 如何进行 native 加密解码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

public class Security {


public native byte[] DecryptMsg(String strMsg);
public native byte[] EncryptMsg(String strMsg);

public native byte[] EncryptPass(String strPass);

static{
    System.loadLibrary("security");
}
}

解决方案

native方法已经写好了,下一步make一下,再下一步生成头文件,再下一步创建c或者c++引入头文件实现里面的方法就可以了。

这篇关于java - android 如何进行 native 加密解码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆