oracle 缺少 DBMS_CRYPTO 包

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34807898/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 03:07:52  来源:igfitidea点击:

DBMS_CRYPTO package is missing

oracleplsqloracle11gshdbms-crypto

提问by Sanja

I am using Oracle Database 11g Enterprise Edition Release 11.2.00.40 - 64bit Production. We have a initial admin user which will be created in a database by inserting into a table during the installation. This action requires to encrypt password using SH1 protocol. Acording to Oracle documentation I should be able to use DBMS_CRYPTO package which comes with Enterprise Edition of database. However I am not able to see it. Instead of DBMS_CRYPTO I can see DBMS_CRYPTO_TOOLKIT package. This package is not so well documented but I was able to find that it comes with Oracle 12c and that even confused me more.

我使用的是 Oracle Database 11g Enterprise Edition Release 11.2.00.40 - 64bit Production。我们有一个初始管理员用户,将在安装过程中通过插入表在数据库中创建该用户。此操作需要使用 SH1 协议加密密码。根据 Oracle 文档,我应该能够使用数据库企业版附带的 DBMS_CRYPTO 包。但是,我无法看到它。我可以看到 DBMS_CRYPTO_TOOLKIT 包,而不是 DBMS_CRYPTO。这个包没有很好的文档记录,但我发现它随 Oracle 12c 一起提供,这让我更加困惑。

Should I install DBMS_CRYPTO package aditionally or to use DBMS_CRYPTO_TOOLKIT package? Is there anybody who can explain how to encrypt pass with DBMS_CRYPTO_TOOLKIT package? I dont have SYS access to database, so I am wondering if there is a way to generate SH1 passwords without using DBMS_CRYPTO that is simple enough? In other words is it worth to install it?

我应该额外安装 DBMS_CRYPTO 包还是使用 DBMS_CRYPTO_TOOLKIT 包?有没有人可以解释如何使用 DBMS_CRYPTO_TOOLKIT 包加密密码?我没有对数据库的 SYS 访问权限,所以我想知道是否有一种方法可以在不使用 DBMS_CRYPTO 的情况下生成 SH1 密码,这很简单?换句话说值得安装吗?

回答by Codo

The Oracle documentation says:

Oracle 文档说:

Security Model

Oracle Database installs this package in the SYS schema. You can then grant package access to existing users and roles as needed.

安全模型

Oracle 数据库在 SYS 模式中安装这个包。然后,您可以根据需要向现有用户和角色授予包访问权限。

Ask your system administration to grant access to it:

请您的系统管理员授予访问权限:

GRANT EXECUTE ON SYS.DBMS_CRYPTO TO USERXY;

Or even:

甚至:

GRANT EXECUTE ON SYS.DBMS_CRYPTO TO PUBLIC;

I don't understand what Oracle tries to achieve by not making this package public. I don't see any harm that you can do by using it.

我不明白 Oracle 不公开这个包的目的是什么。我看不出你使用它有什么危害。