# sm **Repository Path**: cuifox/sm ## Basic Information - **Project Name**: sm - **Description**: 国密sm3 sm4 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-09-03 - **Last Updated**: 2025-12-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SM #### 介绍 国密 #### 安装教程 ```shell script php composer.phar require cuifox/sm:* ``` #### 使用说明 ```php use CuiFox\SM\SM3; $sm3 = new SM3(); $sm3->sign('hello world'); use CuiFox\SM\SM4; $key = '11111111111111111'; $iv = '11111111111111111'; $sm4 = new SM4($key); // 加密 $sm4->enDataCbc('hello world', $iv); // 解密密 $sm4->deDataCbc('h6pI9AvIvXOUVeREFhbe2w==', $iv); ```