欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

java RSA加解密的udf函数

程序员文章站 2022-07-04 14:42:35
...

KeyRSA.java,生成密钥对,上传到hdfs

 

add jar hdfs://nn.dc.sh-wgq.sdo.com/group/p_sdo_data/udf/RSA.jar;
CREATE TEMPORARY FUNCTION rsa as 'com.sdo.hive.udf.RSAUdf';

 

select rsa('13855667788','encode') from lxw_t1 limit 1;

67C267F193E498D3C227479FEC571787EA4141869C56CF024C462572448FCF3EC66A1AF3F5EB2F2FDDDD41B7FF94C02D38C7C917F89EF4F30BF8BB5E73A86182D61DCF724B1FC0941F1A40F84FDCD901FC8D9247902370E6F63E64919898FBB5C83B3E417C2B0A992A94ED76C16780741550D836172C36433CF8E2AFC36B6A97

select rsa('67C267F193E498D3C227479FEC571787EA4141869C56CF024C462572448FCF3EC66A1AF3F5EB2F2FDDDD41B7FF94C02D38C7C917F89EF4F30BF8BB5E73A86182D61DCF724B1FC0941F1A40F84FDCD901FC8D9247902370E6F63E64919898FBB5C83B3E417C2B0A992A94ED76C16780741550D836172C36433CF8E2AFC36B6A97','decode') from lxw_t1 limit 1;

13855667788
 
相关标签: hive rsa java