python实现SM4加密算法
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105Sbox = [ 0xd6, 0x90, 0xe9, 0xfe, 0xcc, 0xe1, 0x3d, 0xb7, 0x16, 0xb6, 0x14, 0xc2, 0x28, 0xfb, 0x2c, 0x05, 0x2b, 0x67, 0x9a, 0x76, 0x2a, 0xbe, 0x04, 0xc3, 0xaa, 0x44, 0x13, 0x26, 0x49, 0x86, 0x06, 0x99, 0x9c, 0x42, 0x50, 0xf4, 0x91, 0xef, 0x98, 0x7a, 0x33, 0x54, 0x0b, 0x43, 0x ...
python实现维吉尼亚密码
points:1.ASCII码的转换
2.对input函数的理解
3.append函数的使用
123456789101112131415161718192021222324252627282930313233343536373839404142434445# import getchdef get_str(str): print("please input plaintext:") chars = input() for char in chars: str.append(char)def get_secret_key(ints): print("please input secret key:") keys = input() for key in keys: int = ord(key) - 97 ints.append(int)def encryption(str, ints, en_str): ints_length = len(ints) str ...
C语言实现凯撒密码(入门)
水一篇文章—-很简单:)
关键点:1.fgets函数的使用
2.ASCII码
3.可使用malloc语句为字符数组进行动态内存分配
1234567891011121314151617181920212223242526272829#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ int i = 0; printf("please input:\n"); char str[100]; fgets(str, sizeof(str), stdin); while (str[i + 1]) { if ((str[i] <= 'c' && str[i] >= 'a') || (str[i] <= 'C' && str[i] >= 'A')) { str[i] = str[i] + 2 ...
游戏测试页
这是一个测试页面无内容





