SHA-1 谷歌 blob 应用程序引擎

发布于 2024-08-18 05:31:03 字数 105 浏览 1 评论 0原文

我可以在实时谷歌应用引擎的数据存储查看器中看到我的 blob 的 SHA-1。

是否有推荐的方法可以在 GAE 中以编程方式访问 blob 的 SHA-1 哈希(或任何其他哈希)?

I can see the SHA-1 of my blobs in the datastore viewer on live google app engine.

Is there a recommended way I can access the SHA-1 hash (or any other hash) of a blob programmatically in GAE?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

沫离伤花 2024-08-25 05:31:03

目前,如果不使用外部脚本下载并散列它,则无法获取存储在 AppEngine 的 blobstore 中的 blob 内容的散列(远非理想的解决方案)。

AppEngine 问题跟踪器上的问题 2510 添加星标可能会帮助获得将 blob 散列到 AppEngine 中的能力。

Currently it is not possible to get the hash of the content of a blob stored in AppEngine's blobstore without using an external script to download it and hash it (a far from ideal solution).

Attaching a star to issue 2510 on the AppEngine issue tracker may help get the ability to hash blobs into AppEngine.

ˉ厌 2024-08-25 05:31:03

您是指 BlobKey 吗?如果是这样,只需将其传递给 str() 即可。否则,只需使用 hashlib 自己生成哈希即可。

Do you mean the BlobKey? If so, just pass it to str(). Otherwise just generate a hash yourself with hashlib.

烏雲後面有陽光 2024-08-25 05:31:03

您看过模块 hashlib 吗?它有一个 sha1() 函数。

Have you looked at the module hashlib? It has a sha1() function.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文