数据加密算法(Data Encryption Algorithm,DEA)是一种对称加密算法,很可能是使用最广泛的密钥系统,特别是在保护金融数据的安全中,最初开发的DEA是嵌入硬件中的。通常,自动取款机(Automated Teller Machine,ATM)都使用DEA。它出自IBM的研究工作,IBM也曾对它拥有几年的专利权,但是在1983年已到期后,处于公有范围中,允许在特定条件下可以免除专利使用费而使用。1977年被美国*正式采纳。 DES的原始思想可以参照二战德国的恩格玛机,其基本思想大致相同。传统的密码加密都是由古代的循环移位思想而来,恩格玛机在这个基础之上进行了扩散模糊。但是本质原理都是一样的。现代DES在二进制级别做着同样的事:替代模糊,增加分析的难度。 DES的加密原理,是使用一个 56 位的密钥以及附加的 8 位奇偶校验位,产生最大 64 位的分组大小。这是一个迭代的分组密码,使用称为 Feistel 的技术,其中将加密的文本块分成两半。使用子密钥对其中一半应用循环功能,然后将输出与另一半进行“异或”运算;接着交换这两半,这一过程会继续下去,但最后一个循环不交换。DES 使用 16 个循环,使用异或,置换,代换,移位操作四种基本运算。 类似于:A1ez8zw/wJ6QNPeMblfS+S1KJJ7l92/lraZM+Ee+NCMUkE7V2/pq0lCoqSrQ4+U8/gBf70/A7ZNI8cK3oqrmdKjVKrWGO4hvbenyn6JJ7OkqEt6U6k2g8VollSqNIa5Ps6YeWED1PEExWtjR7ZyWPzNDkVK322vUKMjIEv1JxUwqBDwryqnxwqyltLhkM8EIK0AJUr6aT+IP30nmNMbtJ4Wg4wxaUx0VG6a26Kmxiu2ldvbu+xXxBF8cWRAmcGXMxC9jzvNH/VGoV58e3XU9+ckAN0gxcL7xzEFG9Bz0pralMuBRCrlcVmgfsEuwUoYXvNwewQOTDQ2krV+C9T/RZKnWr78PL0aDxmM2kT0wsoqRLn5kXd22TIQcmaZf+ueOQ7ugGgGtJAU+GzlUSaF3JPawkZGhixHZVZl7zpSvYa7QHDcn/eMxmkr6BV47+PXyWB10X+7aquC0TShSXrr7kCV0SCdyS4twAb6uC43DPx/5EE9K77qHwho2JBAr5pGkj2grKc4H3KLwVK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amHpnf8fq1kn8+xUSg0ZSra/yr39pnCXKFRAoXAe4vfxI6MWa1b4U7VFYk9WjnvsG/lsX+d5I8wY3m4DnEs0F6SXyA1WXj2gu/Ddt+AuLoa29t9erC1nKP2J8MSKfjR4/K4K+xuh9MU0DHf0fKlKnKL8HvYDxQGRxj8P4+6jm343b3T0lMIsFaPZhuBTIh/ICKZBGup2KUgkkp6QKXI+q6yx6li9pO+eF5aemdt8RMTzp0JY4Ie+HbTlP2ijr4rsrWvUnTKsqH4XhporLmgunE47glClQikfKepRnRYwX46U2pegfNPh9RyDydxpYCg4OwD+TWvd18JKCvp9ZusSlHDxsbZN4ONIv8azDn4UsIGe8VMh8HACzHcX3TyVGAvN0K8s0MM/WkE1eN64/x4+Sm1fqy0p51+CiN2C/xlKNWkPQmaoGjWvM4/ei7aR0QRG8M/uACuRF6CYLcuwKGXDqmfP6o7CBtS+AWFisjrKM1VfaOSPHJUo2vPDBt15LueKWUwyYSTmjjuib5fQS4K58waZk0zI7ugriERWtBQOiyPopMOvkD8REu6ihmo2QvsTb+S1qsMUBNaLKssmuWH3UCtxqKUyVADU2sO93b7JQ7ZfExtQZs/l2igHb当然,这些都是base64编码。那么,什么是base64呢? Base64是网络上最常见的用于传输8Bit字节代码的编码方式之一,大家可以查看RFC2045~RFC2049,上面有MIME的详细规范。Base64编码可用于在HTTP环境下传递较长的标识信息。例如,在Java Persistence系统Hibernate中,就采用了Base64来将一个较长的唯一标识符(一般为128-bit的UUID)编码为一个字符串,用作HTTP表单和HTTP GET URL中的参数。在其他应用程序中,也常常需要把二进制数据编码为适合放在URL(包括隐藏表单域)中的形式。此时,采用Base64编码不仅比较简短,同时也具有不可读性,即所编码的数据不会被人用肉眼所直接看到。 比如,编写一个“123”,得出的结果就是“MTIz”。