package com.sunyard.chsm.sdf.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author liulu
 * @version V1.0
 * @since 2022/11/11
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EccPubKey {
    // 密 钥 位 长
    private int bits;
    // 公 钥 x 坐 标
    private byte[] x;
    // 公 钥 y 坐 标
    private byte[] y;


    public byte[] getPubKeyBytes() {
        byte[] rawKey = new byte[x.length + y.length];
        System.arraycopy(x, 0, rawKey, 0, x.length);
        System.arraycopy(y, 0, rawKey, x.length, y.length);
        return rawKey;
    }

}
