加密算法,仅返回小写加密字符串 [英] Encryption algorithm that returns only lowercase encrypted string

查看:75
本文介绍了加密算法,仅返回小写加密字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有加密算法只返回

只有小写的加密字符串。


提前致谢。

解决方案

你可以做的是取加密字节(使用任何加密

算法),然后手动将它们转换为基础26表示(或者如果你要允许数字,则为b
36)然后在该场景中使用全部小写的

字母。


我不得不问,为什么你要做这样的事情?

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


Optimus < sa ****** @ gmail.com写信息

新闻:11 ********************** @ e65g2000hsc .googlegr oups.com ...


>我想知道是否有加密算法返回

只有小写加密字符串。


提前致谢。



2007年3月19日19:48:50 -0700,Optimus < sa ****** @ gmail.comwrote:


>我想知道是否有加密算法只返回
小写加密字符串。

提前致谢。



没有现代算法可以做到这一点,尽管许多经典算法将会这样做:Ceasar,Playfair,Vigenere等。这取决于明文

只有字母,没有数字。


对你来说更有用的是编码,比如Base32

仅使用单个案例的字母,但它也包括数字。

参见RFC 4648( http://tools.ietf.org/html/rfc4648 )了解详情。

使用现代算法(AES / Rijndael)加密和Base32编码

结果字节流。


如果你确实只需要小写字母,没有数字,那么你

可以做类似编码的事情将密文作为十六进制,然后使用

单个字母替换数字:0-m,1 -n等。你

必须自己编写。


rossum


Base-26

JR


" rossum" < ro ****** @ coldmail.com ???

??????:5n ****************** **************@4ax.com。 ..


2007年3月19日19:48:50 -0700,Optimus < sa ****** @ gmail.comwrote:


>>我想知道是否有加密算法返回
只有小写加密字符串。

提前致谢。



没有现代算法可以做到这一点,尽管许多经典算法将会这样做:Ceasar,Playfair,Vigenere等。这取决于明文

只有字母,没有数字。


对你来说更有用的是编码,比如Base32

仅使用单个案例的字母,但它也包括数字。

参见RFC 4648( http://tools.ietf.org/html/rfc4648 )了解详情。

使用现代算法(AES / Rijndael)加密和Base32编码

结果字节流。


如果你确实只需要小写字母,没有数字,那么你

可以做类似编码的事情将密文作为十六进制,然后使用

单个字母替换数字:0-m,1 -n等。你

必须自己编写。


rossum



I would like to know if there is a encryption algorithm that returns
only lowercase encrypted string.

Thanks in advance.

解决方案

What you could do is take the encrypted bytes (using any encryption
algorithm) and then manually convert them to a base 26 representation (or a
base 36 if you are going to allow numbers) and then use all lowercase
letters in that scenario.

I have to ask though, why do you want to do such a thing?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Optimus" <sa******@gmail.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...

>I would like to know if there is a encryption algorithm that returns
only lowercase encrypted string.

Thanks in advance.



On 19 Mar 2007 19:48:50 -0700, "Optimus" <sa******@gmail.comwrote:

>I would like to know if there is a encryption algorithm that returns
only lowercase encrypted string.

Thanks in advance.

No modern algorithm does this, though many classical algorithms will
do so: Ceasar, Playfair, Vigenere etc. These depend on the plaintext
only having letters, no digits.

What may be of more use to you is an encoding such as Base32 which
only uses letters of a single case, though it also includes digits.
See RFC 4648 (http://tools.ietf.org/html/rfc4648) for details.
Encrypt using a modern algorithm (AES/Rijndael) and Base32 encode the
resulting byte stream.

If you really do need just lowercase letters, no digits, then you
could do something like encode the cyphertext as hex and then use a
single letter substitution for the digits: 0 -m, 1 -n etc. You
would have to write this yourself.

rossum


Base-26

JR

"rossum" <ro******@coldmail.com???
??????:5n********************************@4ax.com. ..

On 19 Mar 2007 19:48:50 -0700, "Optimus" <sa******@gmail.comwrote:

>>I would like to know if there is a encryption algorithm that returns
only lowercase encrypted string.

Thanks in advance.

No modern algorithm does this, though many classical algorithms will
do so: Ceasar, Playfair, Vigenere etc. These depend on the plaintext
only having letters, no digits.

What may be of more use to you is an encoding such as Base32 which
only uses letters of a single case, though it also includes digits.
See RFC 4648 (http://tools.ietf.org/html/rfc4648) for details.
Encrypt using a modern algorithm (AES/Rijndael) and Base32 encode the
resulting byte stream.

If you really do need just lowercase letters, no digits, then you
could do something like encode the cyphertext as hex and then use a
single letter substitution for the digits: 0 -m, 1 -n etc. You
would have to write this yourself.

rossum



这篇关于加密算法,仅返回小写加密字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆