自用 Java 摘要加密工具类,兼容 Android 环境,目前包含有:
-
摘要工具类有:Digest、Hmac
-
加密工具类有:AES、DESede、RSA
有关对称加密的几种模式,请参考:http://www.jianshu.com/p/b63095c59361
Base64 工具类在 Android 上需要替换为 android.util.Base64
实现
在线验证工具:http://tool.oschina.net/encrypt
Copyright 2014 TakWolf
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.