在谷歌应用程序引擎关键字中允许使用哪些字符?

时间:2022-05-18 23:09:39

While testing my Google App Engine application, I search for links which include app engine keys. For example:

在测试我的谷歌应用程序引擎应用程序时,我搜索包含应用程序引擎键的链接。例如:

/story/ag5yZXBsaWUtdGVzdGluZ3IMCxIFU3RvcnkY-w0M/

What characters are allowed in these keys? I had been using the regex [a-zA-Z0-9], but it seems "-" is also allowed. What else?

这些键中允许使用什么字符?我一直在使用regex [a-zA-Z0-9],但似乎“-”也是允许的。还有什么?

Is there a reference on this? I can't find it in the App engine docs.

有关于这个的参考吗?我在App engine文档中找不到。

2 个解决方案

#1


7  

Google App Engine keys are encoded using URL safe base 64 encoding (see The source code for the Key datastore type).

谷歌应用程序引擎键是使用URL安全的64编码(请参阅密钥数据存储类型的源代码)进行编码的。

#2


1  

it's very probably all digits, upper- and lowercase letters, underscore and hyphen (try to base64.urlsafe_b64decode this string ;) )

它很可能是所有的数字,大写和小写字母,下划线和连字符(尝试使用base64)。urlsafe_b64decode这个字符串;)

#1


7  

Google App Engine keys are encoded using URL safe base 64 encoding (see The source code for the Key datastore type).

谷歌应用程序引擎键是使用URL安全的64编码(请参阅密钥数据存储类型的源代码)进行编码的。

#2


1  

it's very probably all digits, upper- and lowercase letters, underscore and hyphen (try to base64.urlsafe_b64decode this string ;) )

它很可能是所有的数字,大写和小写字母,下划线和连字符(尝试使用base64)。urlsafe_b64decode这个字符串;)