package com.sunyard.chsm.sdf.context;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * @author liulu
 * @since 2024/11/5
 */
@Getter
@RequiredArgsConstructor
public enum SunyardAlgId {

    // 哈希算法
    SGD_SM3(0x00000001),

    // 分组算法模式
    SGD_ECB(0x01),
    SGD_CBC(0x02),
    SGD_CFB(0x04),
    SGD_OFB(0x08),
    SGD_MAC(0x10),

    // 分组算法
    SGD_SM1(0x00000100),
    SGD_SSF33(0x00000200),
    SGD_SM4(0x00000400),
    SGD_DES(0x00000800),
    SGD_3DES(0x00001000),
    SGD_IDEA(0x00002000),
    SGD_AES(0x00004000),

    SGD_SM4_ECB(SGD_SM4.value | SGD_ECB.value),
    SGD_SM4_CBC(SGD_SM4.value | SGD_CBC.value),
    SGD_SM4_MAC(SGD_SM4.value | SGD_MAC.value),

    // 公钥用途
    SGD_PK_SIGN(0x0100),
    SGD_PK_DH(0x0200),
    SGD_PK_ENC(0x0400),

    SGD_SM2(0x00020000),
    SGD_SM2_1(SGD_SM2.value | SGD_PK_SIGN.value),
    SGD_SM2_2(SGD_SM2.value | SGD_PK_DH.value),
    SGD_SM2_3(SGD_SM2.value | SGD_PK_ENC.value),

    ;
    private final int value;


}
