java RSA加解密的udf函数

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
 

你可能感兴趣的:(java,hive,rsa)