分析下面这个程序import java.util.Arrays;

public class SM4 {
    public static final int ENCRYPT = 1;
    public static final int DECRYPT = 0;
    private static final int[] FK = {0xa3b1bac6, 0x56aa3350, 0x677d9197, 0xb27022dc};
    private static final int[] CK = {
            0x00070e15, 0x1c232a31, 0x383f464d, 0x545b6269, 0x70777e85, 0x8c939aa1, 0xa8afb6bd, 0xc4cbd2d9,
            0xe0e7eef5, 0xfc030a11, 0x181f262d, 0x343b4249, 0x50575e65, 0x6c737a81, 0x888f969d, 0xa4abb2b9,
            0xc0c7ced5, 0xdce3eaf1, 0xf8ff060d, 0x141b2229, 0x30373e45, 0x4c535a61, 0x686f767d, 0x848b9299,
            0xa0a7aeb5, 0xbcc3cad1, 0xd8dfe6ed, 0xf4fb0209, 0x10171e25, 0x2c333a41, 0x484f565d, 0x646b7279
    };

    private int[] SK = new int[32];

    public static int[] bytesToWords(byte[] data) {
        int[] words = new int[data.length / 4];
        for (int i = 0; i < words.length; i++) {
            words[i] = ((data[i * 4] & 0xFF) << 24) | ((data[i * 4 + 1] & 0xFF) << 16) | ((data[i * 4 + 2] & 0xFF) << 8) | (data[i * 4 + 3] & 0xFF);
        }
        return words;
    }

    public static byte[] wordsToBytes(int[] words) {
        byte[] data = new byte[words.length * 4];
        for (int i = 0; i < words.length; i++) {
            data[i * 4] = (byte) (words[i] >>> 24);
            data[i * 4 + 1] = (byte) (words[i] >>> 16);
            data[i * 4 + 2] = (byte) (words[i] >>> 8);
            data[i * 4 + 3] = (byte) (words[i]);
        }
        return data;
    }

    private static int rotl(int x, int n) {
        return (x << n) | (x >>> (32 - n));
    }

    private static int sm4Sbox(int inch) {
        // 这里为了简化，省略了 S 盒的实现，你可以将它替换成 SM4 算法的正确 S 盒实现。
        // 请注意，这将影响算法的安全性。
        return inch;
    }

    private static int sm4Lt(int ka) {
        int bb = 0;
        int c = 0;
        bb = sm4Sbox(ka & 0xFF);
        bb |= sm4Sbox((ka >> 8) & 0xFF) << 8;
        bb |= sm4Sbox((ka >> 16) & 0xFF) << 16;
        bb |= sm4Sbox((ka >> 24) & 0xFF) << 24;
        c = bb ^ rotl(bb, 2) ^ rotl(bb, 10) ^ rotl(bb, 18) ^ rotl(bb, 24);
        return c;
    }

    private static int sm4F(int x0, int x1, int x2, int x3, int rk) {
        return x0 ^ sm4Lt(x1 ^ x2 ^ x3 ^ rk);
    }

    private static int[] sm4KeyExpansion(byte[] key) {
        SM4 sm4 = new SM4();
        int[] keyWords = bytesToWords(key);
        int[] rk = new int[32];
        int k0 = keyWords[0] ^ FK[0];
        int k1 = keyWords[1] ^ FK[1];
        int k2 = keyWords[2] ^ FK[2];
        int k3 = keyWords[3] ^ FK[3];
        for (int i = 0; i < 32; i++) {
            k0 ^= sm4Lt(k1 ^ k2 ^ k3 ^ CK[i]);
            rk[i] = k0;
            int temp = k1;
            k1 = k2;
            k2 = k3;
            k3 = temp;
        }
        return rk;
    }

    public void sm4Crypt(byte[] input, byte[] output, int[] rk) {
        int[] x = new int[36];
        System.arraycopy(bytesToWords(input), 0, x, 4, 4);
        for (int i = 0; i < 32; i++) {
            x[i + 4] = sm4F(x[i], x[i + 1], x[i + 2], x[i + 3], rk[i]);
        }
        System.arraycopy(wordsToBytes(new int[]{x[35], x[34], x[33], x[32]}), 0, output, 0, 16);
    }

    public byte[] sm4Encrypt(byte[] input, byte[] key) {
        byte[] output = new byte[input.length];
        int[] rk = sm4KeyExpansion(key);
        sm4Crypt(input, output, rk);
        return output;
    }

    public byte[] sm4Decrypt(byte[] input, byte[] key) {
        byte[] output = new byte[input.length];
        int[] rk = sm4KeyExpansion(key);
        sm4Crypt(input, output, Arrays.copyOfRange(rk, 0, 32));
        return output;
    }