yangzhg opened a new issue #8276:
URL: https://github.com/apache/incubator-doris/issues/8276


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   0.15
   
   ### What's Wrong?
   
   encryption function with iv  may return wrong result
   ```
   MySQL [test]> select 
to_base64(SM4_ENCRYPT('text','F3229A0B371ED2D9441B830D21A390C3', 
'0123456789','SM4_128_CBC'));
   +-----------------------------------------------------+
   | to_base64(sm4_encrypt('text', '***', '0123456789')) |
   +-----------------------------------------------------+
   | /Q0/XwXDm8Vy2kpDtSERZQ==                            |
   +-----------------------------------------------------+
   1 row in set (0.004 sec)
   
   MySQL [test]> select 
to_base64(SM4_ENCRYPT('text','F3229A0B371ED2D9441B830D21A390C3', 
'0123456789','SM4_128_CBC'));
   +-----------------------------------------------------+
   | to_base64(sm4_encrypt('text', '***', '0123456789')) |
   +-----------------------------------------------------+
   | Yd/afQ1l5WZZ1VFSiWPQVg==                            |
   +-----------------------------------------------------+
   1 row in set (0.004 sec)
   
   MySQL [test]> select 
to_base64(SM4_ENCRYPT('text','F3229A0B371ED2D9441B830D21A390C3', 
'0123456789','SM4_128_CBC'));
   +-----------------------------------------------------+
   | to_base64(sm4_encrypt('text', '***', '0123456789')) |
   +-----------------------------------------------------+
   | FgDet0kcwM5jumAsE8vh9g==                            |
   +-----------------------------------------------------+
   1 row in set (0.006 sec)
   ```
   
   ### What You Expected?
   
   result for same text, key, iv the result should be same 
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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