根据以下条件生成多种数字组合

发布于 2024-09-08 18:41:54 字数 365 浏览 1 评论 0原文

我只是想知道是否有一种方法可以仅基于一个数字/字母来生成许多不同的数字和字母组合?例如:

仅从这个字符串:

234jk43fc7898cfg58

我们可以生成许多不同的组合,例如:

HGYTD786Gjhghjg76fghf8
8976sgh8976
cv34905bv7
435bv4875bvg487bv
45b6467ne456n
4n56n45n6

...其中每个生成的字符串最终都能够重新计算回其原始字符串: 234jk43fc7898cfg58

这可能吗?我将不胜感激任何帮助。

谢谢

I was just wondering if there's a way to generate many different combinations of numbers and letters, based off of just one number/letter? For example:

From just this one String:

234jk43fc7898cfg58

We could generate MANY different combos like:

HGYTD786Gjhghjg76fghf8
8976sgh8976
cv34905bv7
435bv4875bvg487bv
45b6467ne456n
4n56n45n6

... where each generated string would end up being able to be recalculated BACK to its original String:
234jk43fc7898cfg58

Is this at all possible? I'd appreciate any help at all.

Thank you

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

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

发布评论

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

评论(2

烟凡古楼 2024-09-15 18:41:54

在数学中,您正在寻找的东西称为“可逆函数”。

您的组合想法看起来不太可行,但肯定有可逆函数可用于处理这样的数据。

例如,像 Zip 这样的压缩工具的存在应该会给你带来希望……

你想要这个功能做什么?如果它与密码学有任何联系,我的建议是使用 .Net 本身的密码学功能 - 不要尝试重新发明一个特别复杂的轮子。除此之外,.Net 的功能将远远超出您所能想到的任何功能。不是想让你失望——只是想帮忙……

马丁。

What you're looking for, in mathematics, is called a "Reversable Function".

Your combinations idea looks like a non starter, but there certainly are reversible functions available for dealing with data like this.

For instance, the existence of compression tools like Zip should give you hope...

What do you want the function for? If it's in anyway connected with cryptography my advice is to use the Cryptography features of .Net itself - don't try to reinvent a particularly complicated wheel. Added to which, the capabilties of .Net will far exceed anything you come up with. Not trying to put you down - just trying to be helpful...

Martin.

阳光①夏 2024-09-15 18:41:54

对我来说,这听起来像是一种压缩算法(例如 7zip),用于将相同的信息存储在更少的字节或编码方案(例如 base64)仅用一个子集来存储相同的信息可用的字节组合。

For me this sounds like a compression algorithm (e.g. 7zip) to store the same information in lesser bytes or an encoding scheme (e.g. base64) to store the same information with only a subset of available byte combinations.

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