android studio AES256 CBC加密:
提示:java版本14.0.1-7
构建按钮触发,随机密码,后续修改随机初始化向量VI
直接上代码:
import...
public class aesss extends AppCompatActivity implements View.OnClickListener {
TextView tv1;
TextView tv2;
private Button btn,btn1;
private EditText edtt;
private static String Edtt;
public static final String IV = "1234567890123456";
private static Key KEY;
private static String JM;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_aesss);
tv1 = findViewById(R.id.aestextView);
tv2 = findViewById(R.id.aestextView2);
btn = findViewById(R.id.aesbutton13);
btn1 = findViewById(R.id.aesbutton14);
edtt = findViewById(R.id.aeseditText);
btn.setOnClickListener(