morrySnow commented on code in PR #1814:
URL: https://github.com/apache/doris-website/pull/1814#discussion_r1918073350


##########
docs/sql-manual/sql-functions/scalar-functions/encrypt-digest-functions/aes-decrypt.md:
##########
@@ -22,59 +22,87 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-### Description
+## Description
 
-AES decryption function. This function behaves like the `AES_DECRYPT` function 
in MySQL. By default, it uses the `AES_128_ECB` algorithm with `PKCS7` padding 
mode.
+AES decryption function. This function behaves the same as the `AES_DECRYPT` 
function in MySQL. The default algorithm is `AES_128_ECB`, and the padding mode 
is `PKCS7`.
 
-### Syntax
+## Syntax
 
 ```sql
-VARCHAR AES_DECRYPT(VARCHAR str, VARCHAR key_str [, VARCHAR init_vector [, 
VARCHAR encryption_mode]])
+VARCHAR AES_DECRYPT(VARCHAR <str>, VARCHAR <key_str>[, VARCHAR 
<init_vector>][, VARCHAR <encryption_mode>])
 ```
 
-### Parameters
+## Parameters
 
-- `str` is the text to be decrypted;
-- `key_str` is the key. Note that this key is not a hexadecimal encoding, but 
a string representation of the encoded key. For example, for 128-bit key 
encryption, `key_str` should be 16-length. If the key is not long enough, use 
**zero padding** to make it up. If it is longer than that, the final key is 
found using a cyclic xor method. For example, if the 128-bit key used by the 
algorithm finally is `key`, then `key[i] = key_str[i] ^ key_str[i+128] ^ 
key_str[i+256] ^ ...`
-- `init_vector` is the initial vector to be used in the algorithm, this is 
only valid for some algorithms, if not specified then Doris will use the 
built-in value;
-- `encryption_mode` is the encryption algorithm, optionally available in 
variable.
+| parameter           | description                                            
                                                                                
                                                             |
+|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `<str>`             | The text to be decrypted                               
                                                                                
                                                                               |
+| `<key_str>`         | is the key. Note that this key is not a hexadecimal 
encoding, but an encoded string representation. For example, for 128-bit key 
encryption, the length of `key_str` should be 16. If the key length is 
insufficient, use **zero padding** to make it complete. If the length exceeds, 
use circular XOR to find the final key. For example, if the 128-bit key used by 
the algorithm is `key`, then `key[i] = key_str[i] ^ key_str[i+128] ^ 
key_str[i+256] ^ ...` |

Review Comment:
   ```suggestion
   | `<key_str>`         | It is the key. Note that this key is not a 
hexadecimal encoding, but an encoded string representation. For example, for 
128-bit key encryption, the length of `key_str` should be 16. If the key length 
is insufficient, use **zero padding** to make it complete. If the length 
exceeds, use circular XOR to find the final key. For example, if the 128-bit 
key used by the algorithm is `key`, then `key[i] = key_str[i] ^ key_str[i+128] 
^ key_str[i+256] ^ ...` |
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/encrypt-digest-functions/aes-encrypt.md:
##########
@@ -22,65 +22,74 @@ specific language governing permissions and limitations
 under the License.
 -->
 
+## Description
 
-### Description
+AES encryption function. This function behaves the same as the `AES_ENCRYPT` 
function in MySQL. The default algorithm is `AES_128_ECB`, and the padding mode 
is `PKCS7`.
 
-AES encryption function. This function behaves like the `AES_ENCRYPT` function 
in MySQL. By default, it uses the `AES_128_ECB` algorithm with `PKCS7` padding 
mode.
+## Syntax
 
-### Syntax
-
-```
-VARCHAR AES_ENCRYPT(VARCHAR str, VARCHAR key_str [, VARCHAR init_vector [, 
VARCHAR encryption_mode]])
+```sql
+VARCHAR AES_ENCRYPT(VARCHAR str, VARCHAR key_str[, VARCHAR init_vector][, 
VARCHAR encryption_mode])
 ```
 
-### Parameters
+## Parameters
+
+| parameter           | description                                            
                                                                                
                                                             |
+|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `<str>`             | The text to be encrypted                               
                                                                                
                                                                               |
+| `<key_str>`         | is the key. Note that this key is not a hexadecimal 
encoding, but an encoded string representation. For example, for 128-bit key 
encryption, the length of `key_str` should be 16. If the key length is 
insufficient, use **zero padding** to make it complete. If the length exceeds, 
use circular XOR to find the final key. For example, if the 128-bit key used by 
the algorithm is `key`, then `key[i] = key_str[i] ^ key_str[i+128] ^ 
key_str[i+256] ^ ...` |
+| `<init_vector>`     | It is the initial vector used in the algorithm. It is 
only effective under specific algorithms. If not specified, Doris uses the 
built-in vector                                                                 
                                                                                
         |
+| `<encryption_mode>` | For encryption algorithms, optional values ​​are given 
in variables                                                                    
                                                                                
                                   |
+
 
-- `str` is the text to be encrypted;
-- `key_str` is the key. Note that this key is not a hexadecimal encoding, but 
a string representation of the encoded key. For example, for 128-bit key 
encryption, `key_str` should be 16-length. If the key is not long enough, use 
**zero padding** to make it up. If it is longer than that, the final key is 
found using a cyclic xor method. For example, if the 128-bit key used by the 
algorithm finally is `key`, then `key[i] = key_str[i] ^ key_str[i+128] ^ 
key_str[i+256] ^ ...`
-- `init_vector` is the initial vector to be used in the algorithm, this is 
only valid for some algorithms, if not specified then Doris will use the 
built-in value;
-- `encryption_mode` is the encryption algorithm, optionally available in 
variable.
+## Return Value
 
-### Notice
+Returns the encrypted binary data
 
-For the incoming key, the AES_ENCRYPT function not directly uses, but will 
further process it. The specific steps are as follows:
 
-1. According to the encryption algorithm used, determine the number of bytes 
of the key, for example, if you use the AES_128_ECB algorithm, the number of 
bytes of the key is `128 / 8 = 16` (if you use the AES_256_ECB algorithm, the 
number of bytes of the key is `128 / 8 = 32`). 2;
-2. then for the key entered by the user, bits `i` and `16*k+i` are used to 
perform an isomorphism, followed by a zero if the key entered by the user is 
less than 16 bits. 3. finally, the newly generated key is used to generate a 
new key;
-3. finally, the newly generated key is used for encryption.
+## Precautions

Review Comment:
   删除这一小节,内容移动到描述里面



##########
docs/sql-manual/sql-functions/scalar-functions/encrypt-digest-functions/aes-decrypt.md:
##########
@@ -22,59 +22,87 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-### Description
+## Description
 
-AES decryption function. This function behaves like the `AES_DECRYPT` function 
in MySQL. By default, it uses the `AES_128_ECB` algorithm with `PKCS7` padding 
mode.
+AES decryption function. This function behaves the same as the `AES_DECRYPT` 
function in MySQL. The default algorithm is `AES_128_ECB`, and the padding mode 
is `PKCS7`.
 
-### Syntax
+## Syntax
 
 ```sql
-VARCHAR AES_DECRYPT(VARCHAR str, VARCHAR key_str [, VARCHAR init_vector [, 
VARCHAR encryption_mode]])
+VARCHAR AES_DECRYPT(VARCHAR <str>, VARCHAR <key_str>[, VARCHAR 
<init_vector>][, VARCHAR <encryption_mode>])

Review Comment:
   ```suggestion 
   AES_DECRYPT(<str>, <key_str>[, <init_vector>][, <encryption_mode>])
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/encrypt-digest-functions/murmur-hash3-64.md:
##########
@@ -22,42 +22,42 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## murmur_hash3_64
+## Description
 
-### description
-#### Syntax
+Calculate 64-bit murmur3 hash value
 
-`BIGINT MURMUR_HASH3_64(VARCHAR input, ...)`
+-Note: After testing, the performance of `xxhash_64` is about twice that of 
`murmur_hash3_64`, so when calculating hash values, it is recommended to use 
`xxhash_64` instead of `murmur_hash3_64`.
 
-Return the 64 bits murmur3 hash of input string.
 
-Note: When calculating hash values, it is more recommended to use `xxhash_64` 
instead of `murmur_hash3_64`.
+## Syntax
 
-### example
-
-```
-mysql> select murmur_hash3_64(null);
-+-----------------------+
-| murmur_hash3_64(NULL) |
-+-----------------------+
-|                  NULL |
-+-----------------------+
-
-mysql> select murmur_hash3_64("hello");
-+--------------------------+
-| murmur_hash3_64('hello') |
-+--------------------------+
-|     -3215607508166160593 |
-+--------------------------+
-
-mysql> select murmur_hash3_64("hello", "world");
-+-----------------------------------+
-| murmur_hash3_64('hello', 'world') |
-+-----------------------------------+
-|               3583109472027628045 |
-+-----------------------------------+
+```sql
+MURMUR_HASH3_64( VARCHAR <str> [ , <str> ... ] )
 ```
 
-### keywords
+## Parameters
+
+| parameter      | description                                             |
+|---------|------------------------------------------------|
+| `<str>` | The 64-bit murmur3 hash value to be calculated |
+
+## Return Value
+
+Returns the 64-bit murmur3 hash of the input string。
+
+-When the parameter is NULL, it returns NULL

Review Comment:
   ```suggestion
   - When the parameter is NULL, it returns NULL
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to