Pu Zhibing
4 天以前 db0b7644a9a5a62ac2da3cf571fee41bb8b6974f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.ruoyi.jianguan.elutong.core;
 
/**
 * 签名算法类型
 */
public enum SignAlgorithm {
 
    // The RSA signature algorithm
    NONEwithRSA("NONEwithRSA", "RSA"),
 
    // The MD2/MD5 with RSA Encryption signature algorithm
    MD2withRSA("MD2withRSA", "RSA"),
    MD5withRSA("MD5withRSA", "RSA"),
 
    // The signature algorithm with SHA-* and the RSA
    SHA1withRSA("SHA1withRSA", "RSA"),
    SHA256withRSA("SHA256withRSA", "RSA"),
    SHA384withRSA("SHA384withRSA", "RSA"),
    SHA512withRSA("SHA512withRSA", "RSA"),
 
    // The Digital Signature Algorithm
    NONEwithDSA("NONEwithDSA", "DSA"),
    // The DSA with SHA-1 signature algorithm
    SHA1withDSA("SHA1withDSA", "DSA"),
 
    // The ECDSA signature algorithms
    NONEwithECDSA("NONEwithECDSA", "EC"),
    SHA1withECDSA("SHA1withECDSA", "EC"),
    SHA256withECDSA("SHA256withECDSA", "EC"),
    SHA384withECDSA("SHA384withECDSA", "EC"),
    SHA512withECDSA("SHA512withECDSA", "EC");
 
    private String value;
    private String type;
 
    /**
     * 构造
     *
     * @param value 算法字符表示,区分大小写
     * @param type  XXXwithXXX算法的后半部分算法,如果为ECDSA,返回算法为EC
     */
    private SignAlgorithm(String value, String type) {
        this.value = value;
        this.type = type;
    }
 
    /**
     * 获取算法字符串表示,区分大小写
     *
     * @return 算法字符串表示
     */
    public String getValue() {
        return this.value;
    }
 
    public String getType() {
        return type;
    }
 
    public void setType(String type) {
        this.type = type;
    }
 
}