Rijndael加密

发布于 2024-07-23 05:19:27 字数 96 浏览 4 评论 0原文

这个加密库使用管道字符吗? 我将密钥与相应的 UserID 值一起存储在数组中,并用管道字符分隔它们。 如果库生成带有管道字符的键,那么当我稍后分割字符串时,这些键将被破坏。

does this encryption library use pipe characters? I'm storing the key in an array with the corresponding UserID value, and delimiting them with a pipe character. If the library generates keys with pipe characters, those keys will get mangled when I split the string later.

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

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

发布评论

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

评论(2

尐偏执 2024-07-30 05:19:27

密钥应该是随机的,因此可以顺便包含管道字符。 您应该在管道分隔字符串中将其表示为十六进制或 base-64,以避免出现不可预测的结果。

The key should be random, and so could contain pipe characters incidentally. You should represent it as hexadecimal or base-64 in your pipe-delimited string to avoid unpredictable results.

妄断弥空 2024-07-30 05:19:27

我不知道有一个名为 Rijndael 的图书馆。 我知道一种名为 Rijndael(现在为 AES)的对称密码,但该密码会加密内容 — 它不会生成密钥。

如果您指的是密码,那么您的问题不适用。 如果您指的是一段特定的代码(即一个库),那么链接会很有用,这样我们都可以看到您正在谈论哪个特定的 Rijndael 实现库。

话虽这么说,您始终可以将任何数据重新编码为,例如,base64、十六进制、二进制或您喜欢的任何没有管道字符的数据。

I don't know of a library named Rijndael. I know of a symmetric cipher named Rijndael (now AES), but the cipher encrypts stuff---it doesn't generate keys.

If you mean the cipher, your question doesn't apply. If you mean a particular piece of code (i.e. a library), a link would be useful so we can all see which particular Rijndael-implementing library you're talking about.

That being said, you can always recode any data to, say, base64, or hex, or binary, or whatever you prefer, that doesn't have a pipe character.

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