跳过导航链接

Commons core 1.0 API

程序包 
程序包 说明
code.ponfee.commons.base  
code.ponfee.commons.base.tuple  
code.ponfee.commons.collect  
code.ponfee.commons.concurrent  
code.ponfee.commons.constrain  
code.ponfee.commons.data  
code.ponfee.commons.data.lookup  
code.ponfee.commons.date  
code.ponfee.commons.exception  
code.ponfee.commons.export  
code.ponfee.commons.extract  
code.ponfee.commons.extract.streaming  
code.ponfee.commons.extract.streaming.xls  
code.ponfee.commons.http  
code.ponfee.commons.io  
code.ponfee.commons.io.charset  
code.ponfee.commons.jce
Java Cryptography Extension提供用于加密、密钥生成和协商 以及 Message Authentication Code(MAC)算法的实现 http://www.freebuf.com/articles/others-articles/136742.html https://www.jianshu.com/p/b10a892879a0 1、密码: 你知道什么:口令(密码)、口令摘要、质询/响应 你有什么:认证令牌(质询/响应令牌、时间令牌),PIN双因素认证、SSL与认证令牌、智能卡 你是什么:生物特征认证,FAR(False Accept Ratio),FRR(False Reject Ratio) 2、对称加密: 优点:效率高 缺点:密钥成几何数增长、需要事先协商密钥 类型:分组密码(DES、3DES、AES),序列密码(RC4)、盐加密(PBE) 分组模式:ECB、CBC、OFB、CFB 填充:NoPadding, PKCS5Padding, PKCS7Padding, PADDING_ISO10126 AES要支持256位密钥:http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html 解压后替换jre/lib/security/目录下的jar文件即可 3、非对称加密: 优点:密钥分发安全,公开公钥即可 缺点:效率低 算法: DH:基于离散对数的实现,主要用于密钥交换 RSA:基于大整数因式分解的实现,Ron [R]ivest, Adi [S]hamir, Leonard [A]dleman(三人) https://www.kancloud.cn/kancloud/rsa_algorithm/48488 DSA:基于整数有限域离散对数难题(特点是两个素数公开),Digital Signature Algorithm,顾名思义只用于数字签名 ECC:基于椭圆曲线算法,指在取代RSA 填充:RSA_PKCS1_PADDING(blocklen=keysize/8–11)、RSA_PKCS1_OAEP_PADDING(keysize-41)、RSA_NO_PADDING 签名/验签:PKCS1及填充、PKCS7格式(附原文|不附原文) PKCS: Public-Key Cryptography Standards PKI: Public-Key Infrastructure 4、对称与非对称结合:数字信封envelop,结构体,(带签名|不带签名) 5、数字证书:ASN1、X509、p7b、p7r、p10、p12、PEM、DER等概念 6、BASE64编码:3个字节切分为4个字节后每字节最高位补00 0 ~ 63, “=”,并与编码表对照 前生:解决邮件只能发ASCII码问题 应用:二进制字节流数据文本化(某些场景的网络传输及文本表示) 7、哈希算法:指纹、摘要,用于防篡改等 MD5:前身MD2、MD3和MD4,安全性低,算法原理(填充、记录长度、数据处理) SHA-1:已被严重质疑 SHA-2:SHA-224、SHA-256、SHA-384、SHA-512,算法跟SHA-1基本上仍然相似 SHA-3:之前名为Keccak算法,是一个加密杂凑算法 RIPEMD-160:哈希加密算法,用于替代128位哈希函数 MD4、MD5 和 RIPEMD 8、密码安全:BCrypt、SCrypt、PBKDF2, Argon2 9、时间戳、签章 10、区块链: https://anders.com/blockchain,https://www.zhihu.com/question/22075219 SHA256: block_header = version + previous_block_hash + merkle_root + time + target_bits + nonce for i in range(0, 2^32): if sha256(sha256(block_header)) < target_bits: break else: continue version:block的版本(静态常数) previous_block_hash:上一个block的hash值(前一区块已经是打包好的) merkle_root:需要写入的交易记录的hash树的值(根据本次交易包含的交易列表得到) time:更新时间(utc时间:取打包时的时间,也不需要很精确,前后几十秒也都可以) target_bits:当前难度 nonce:从0试到最大值2^32 target_bits:TARGET_MAX/difficulty,创世区块时的difficulty=1 TARGET_MAX=0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF https://www.liaoxuefeng.com/article/1124144362997184 ┌─────────────────────────────────────────────┐ │Tx: abcd...1234 │ ├─────────────────────┬───────────────────────┤ │ TxIn │ TxOut │ ├─────────────┬───────┼──────┬────────────────┤ │prev hash │index │btc │pkScript │ ├─────────────┼───────┼──────┼────────────────┤ │2016...a3c5 │3 │0.15 │OP_DUP a1b2... │<─┐ ├─────────────┼───────┼──────┼────────────────┤ │ │2015...b6d8 │1 │0.08 │OP_DUP c3d4
code.ponfee.commons.jce.cert  
code.ponfee.commons.jce.digest  
code.ponfee.commons.jce.implementation
The crypto implementation by self, include digest, rsa and ecc
code.ponfee.commons.jce.implementation.digest  
code.ponfee.commons.jce.implementation.ecc
ECC implementation
code.ponfee.commons.jce.implementation.rsa
RSA implementation
code.ponfee.commons.jce.implementation.symmetric  
code.ponfee.commons.jce.passwd  
code.ponfee.commons.jce.pkcs  
code.ponfee.commons.jce.security  
code.ponfee.commons.jce.sm  
code.ponfee.commons.jce.symmetric  
code.ponfee.commons.json  
code.ponfee.commons.limit.current  
code.ponfee.commons.limit.request  
code.ponfee.commons.log  
code.ponfee.commons.math  
code.ponfee.commons.model  
code.ponfee.commons.mybatis  
code.ponfee.commons.parser  
code.ponfee.commons.pdf  
code.ponfee.commons.pdf.sign  
code.ponfee.commons.reflect  
code.ponfee.commons.resource  
code.ponfee.commons.schema  
code.ponfee.commons.schema.json  
code.ponfee.commons.serial  
code.ponfee.commons.spring  
code.ponfee.commons.tree  
code.ponfee.commons.tree.print  
code.ponfee.commons.util  
code.ponfee.commons.web  
code.ponfee.commons.ws  
code.ponfee.commons.ws.adapter
解决WebService输入与输出数据无法转换问题 1.当形参或返回值是String、基本数据类型时,CXF可以处理 2.当形参或返回值是JavaBean式的复合类型、List集合、数组时,CXF可以处理 3.当形参或返回值是一些如Map、非Javabean等复合类型时,CXF无法处理 若还无法转换,可在接口类(interface)上加注解:@XmlSeeAlso({ String[].class, Object[].class, Object[][].class, SomeBean[].class }) `@XmlJavaTypeAdapter(MarshalJsonAdapter.class)
code.ponfee.commons.ws.adapter.model
model类
code.ponfee.commons.xml  
跳过导航链接

Copyright © 2022. All rights reserved.