在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:scottyab/AESCrypt-Android开源软件地址:https://github.com/scottyab/AESCrypt-Android开源编程语言:Java 100.0%开源软件介绍:AESCrypt-AndroidSimple API to perform AES encryption on Android with no dependancies. This is the Android counterpart to the AESCrypt library Ruby and AESCrypt-ObjC created by Gurpartap Singh. It used the same weak :'( security defaults i.e Blank IV noted below. For compatiblity with AESCrypt, AESCrypt-Android has the same defaults namely:
*Using CBC with the default blank IV is vulnerable. This has been left in for compatibility with AESCrypt implementations. See Adv method for providing your own IV. If you don't need to be compatable with AESCrypt then look at java-aes-crypto it's API is just as simple and generates more secure keys. DependencyDownload from Maven Central (.aar) or dependencies {
compile 'com.scottyab:aescrypt:0.0.1'
} UsageEncryptString password = "password";
String message = "hello world";
try {
String encryptedMsg = AESCrypt.encrypt(password, message);
}catch (GeneralSecurityException e){
//handle error
} DecryptString password = "password";
String encryptedMsg = "2B22cS3UC5s35WBihLBo8w==";
try {
String messageAfterDecrypt = AESCrypt.decrypt(password, encryptedMsg);
}catch (GeneralSecurityException e){
//handle error - could be due to incorrect password or tampered encryptedMsg
}
Recommended |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论