|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
只需每年花费2000到5000美元。无论你是自掏腰包来创建一个新兴公司,还是得到了风险投资商的赞助,使用MySQL都可以降低你所需要的人力成本。oracle|加密
利用OracleWrap工具加密你的代码
LastUpdated:Monday,2004-11-1522:31Eygle
Oracle供应Wrap工具,能够用于加密你的Package等.
不外必要注重的是,加密后的代码没法解密,你必要保管好你的源代码。
以下是个例子:
1.源代码
createorreplacefunctionget_rowid(l_rowidinvarchar2)returnvarchar2isls_my_rowidvarchar2(200);rowid_typenumber;object_numbernumber;relative_fnonumber;block_numbernumber;row_numbernumber;begindbms_rowid.rowid_info(l_rowid,rowid_type,object_number,relative_fno,block_number,row_number);ls_my_rowid:=Object#is:||to_char(object_number)||chr(10)||Relative_fnois:||to_char(relative_fno)||chr(10)||Blocknumberis:||to_char(block_number)||chr(10)||Rownumberis:||to_char(row_number);returnls_my_rowid;end;/
2.代码功效测试
[oracle@jumpertools]$sqlplusscott/tigerSQL*Plus:Release9.2.0.4.0-ProductiononMonNov1521:56:362004Copyright(c)1982,2002,OracleCorporation.Allrightsreserved.Connectedto:Oracle9iEnterpriseEditionRelease9.2.0.4.0-ProductionWiththePartitioningoptionJServerRelease9.2.0.4.0-ProductionSQL>@f_get_rowidFunctioncreated.SQL>selectrowidfromdeptwheredeptno=10;ROWID------------------AAABiPAABAAAFRSAAASQL>selectget_rowid(AAABiPAABAAAFRSAAA)fromdual;GET_ROWID(AAABIPAABAAAFRSAAA)------------------------------------------------------------------Object#is:6287Relative_fnois:1Blocknumberis:21586Rownumberis:0SQL>![oracle@jumpertools]$lsct.sqlddlt.sqlf_get_rowid.sqlgetevent.sql
3.利用wrap加密及加密后的代码
[oracle@jumpertools]$wrapiname=f_get_rowid.sqloname=f_get_rowid.plbPL/SQLWrapper:Release9.2.0.4.0-ProductiononMonNov1521:59:392004Copyright(c)OracleCorporation1993,2001.AllRightsReserved.Processingf_get_rowid.sqltof_get_rowid.plb[oracle@jumpertools]$catf_get_rowid.plbcreateorreplacefunctionget_rowidwrapped0abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd389200000140172:e:1FUNCTION:1GET_ROWID:1L_ROWID:1VARCHAR2:1RETURN:1LS_MY_ROWID:1200:1ROWID_TYPE:1NUMBER:1OBJECT_NUMBER:1RELATIVE_FNO:1BLOCK_NUMBER:1ROW_NUMBER:1DBMS_ROWID:1ROWID_INFO:1Object#is:::1||:1TO_CHAR:1CHR:110:1Relative_fnois:::1Blocknumberis:::1Rownumberis:::0008320a08d8fa0b03db4:2a02c6aa3a051a51c81b0a3a01c81b0a3a01c81b0a3a01c81b0a3a01c81b0a3a01c81b0:2a06b:6a0a557a06e7e:2a0a5bb42e7ea051a5bb42e7e6eb42e7e:2a0a5bb42e7ea051a5bb42e7e6eb42e7e:2a0a5bb42e7ea051a5bb42e7e6eb42e7e:2a0a5bb42ed:2a065b7a4b111684f1d17b5832037231f1e2b1b3034383c5944484b4c544375646870408d7c808863a9989ca460c1b0b4bc97ddccd0d894c8e4e8ebeff3f7fbff10310410910d11211511911d11e12012112612912d13013113313413913c14114214714a14e15215315515615b15e16216516616816916e17117617717c17f18318718818a18b19019319719a19b19d19e1a31a61ab1ac1b11b41b81bc1bd1bf1c01c51c91cd1d11d51d71db1dd1e91ed1ef1f01f983201a2d:22:218:31e1716:2e:21:3d:21:310:21:3f:21:3f:21:3d12:2d18202b394755:321124262e:226:2113c3e42:23e:211453:211161820:218:2112d2f33:22f:211363:211161820:218:2112d2f33:22f:211363:211161820:218:211:2292:918340:21:52:23:21:75:56:57:58:59:5a:bc:11de:2d:5e:2d:5e:2def:2d:5f:2d:5f:2df10:2d:510:3d:311:2b:711fb4:301:302:a07e1:705:2034:303:7054:305:304:307907e2a:20b60094:307:207df:60121007c06:60f940d9:3014:70171507c08:609:3019:701c1a07c0a:6013c80119:301e:70211f07c0b:609:3023:70262407c0c:60e:309:3028:702b2907c0d:60f:302c2d03:308:30a:30b:30c:30d:30152e35:207a6:3010:4011:2012:30a:301c3a3c1e393e:3011:2013:3014:20214143234045:3011:2015:40264749:3011:2012:30b:30294c4e2b4b50:3011:2013:3014:202e5355305257:3011:2016:4033595b:3011:2012:30c:30365e60385d62:3011:2013:3014:203b65673d6469:3011:2017:40406b6d:3011:2012:30d:30437072456f74:30377507a5:306:3078:207a487d:307d4c7d7c7a7b:607e:202a7d81:30807e82:80534:3013161e1c11311811d12212762f303132333413b2383d14223f442464814d24a4f154251562585a15f25c611662636826a6c17126e733367679611161b20252a14081011418000000000000000000003102210201c101310271018101d100/
4.测试加密后的代码
[oracle@jumpertools]$exitexitSQL>dropfunctionget_rowid;Functiondropped.SQL>@f_get_rowid.plbFunctioncreated.SQL>selectget_rowid(AAABiPAABAAAFRSAAA)fromdual;GET_ROWID(AAABIPAABAAAFRSAAA)-----------------------------------------------------------------Object#is:6287Relative_fnois:1Blocknumberis:21586Rownumberis:0SQL>
本文作者:
eygle,Oracle手艺存眷者,来自中国最年夜的Oracle手艺论坛itpub.
www.eygle.com是作者的团体站点.你可经由过程Guoqiang.Gai@gmail.com来接洽作者.接待手艺切磋交换和链接互换.
原文出处:
http://www.eygle.com/faq/Use.Wrap.to.Encryption.You.Code.htm
对免费版的用户也具有充足的支持服务。在dev.mysql.com上,一个大型的MySQL学习教程强大社区用户和开发者可以讨论所有关于MySQL的事情。这个站点拥有博客、指南、视频、技术交流会、白皮书和论坛等方式的交流。 |
|