简体   繁体   中英

is it possible to encrypt 10 digit number to 4 digit number using any algorithm?

示例 10 位数字 9898989898 之后,如果我解密该 4 位或 6 位数字与 9898989898 相同,这应该加密为 4 位或 6 位数字。他们是否有任何算法可以做到这一点,请帮助我

我会说不:由于鸽巢原理,您没有足够的 4-6 位数字来“解密”回您原来的 10 位数字。

You need an alphabet with at least 47 characters in order to encode 10 digits with 6 characters. See here .

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM