メインコンテンツまでスキップ
バージョン: 26.x

SM3

説明

SM3 256ビットの計算

構文

SM3( <input> )

パラメータ

parameterdescription
<input>計算が必要なsm3の値。文字列とバイナリ型を受け付けます

Return Value

入力文字列のsm3値を返します

Examples

-- vb (VarBinary) and vc (VarChar) used the same string during insertion.
SELECT * FROM mysql_catalog.binary_test.binary_test;
+------+------------+------+
| id | vb | vc |
+------+------------+------+
| 1 | 0x616263 | abc |
| 2 | 0x78797A | xyz |
| 3 | NULL | NULL |
+------+------------+------+
SELECT SM3(vb), SM3(vc) FROM mysql_catalog.binary_test.binary_test;
+------------------------------------------------------------------+------------------------------------------------------------------+
| SM3(vb) | SM3(vc) |
+------------------------------------------------------------------+------------------------------------------------------------------+
| 66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0 | 66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0 |
| 869fff440724014a7e086c8b3680f4cfc6a3390670f6e7755a4f0c43c1c31db6 | 869fff440724014a7e086c8b3680f4cfc6a3390670f6e7755a4f0c43c1c31db6 |
| NULL | NULL |
+------------------------------------------------------------------+------------------------------------------------------------------+