bobobobo
bobobobo

Reputation: 67254

SHA-1 google blob app engine

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?

Upvotes: 1

Views: 1123

Answers (3)

Noah McIlraith
Noah McIlraith

Reputation: 14292

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.

Upvotes: 2

Bob Aman
Bob Aman

Reputation: 33239

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

Upvotes: 1

jbochi
jbochi

Reputation: 29634

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

Upvotes: 0

Related Questions