- 博客(12)
- 收藏
- 关注
原创 python3 解决输入问题
Copyright © 2018 Joyce_BYAll rights reserved.Contact by Yagnes126@gmail.com刷oj的时候很多题的数据是以空格分隔的,以前使用c++就很简单可以处理,python2的input()只接受一个数字。到了python3,input()函数以换行符为界限,接受一个字符串,此时碰到空格符分离的数据。我们仍然可以用一行代码实...
2018-11-09 17:34:38
479
原创 python3 解一元一次方程
题目输入一串字符串表示一个一元一次方程,计算结果。eg:10x-2x-8=x+7+4x思路1、将等号右边的减到左边,即替换=为’-(’,最后表达式加上’)’;2、此题给出的x和数字之间没有乘号,我们现在所有x前面加上*号;3、考虑到系数为1、-1和左括号后的x前不应该有乘号,我们将这些地方的乘号去除;4、用python的eval函数可以生成表达式,将变量=1j带入得到结果,此时会得到...
2018-11-08 12:53:54
9374
原创 RSA私钥加密解密
Copyright © 2018 Joyce_BYAll rights reserved.Contact by Yagnes0126@gmail.com实验原理及算法generate key本次仿真利用私钥(n,sID)生成公钥,具体过程如下:A)选择一对512bit的素数p,q,计算n = p * q;B)计算fn = (p-1) * (q-1);C)根据e * d ≡ 1 ...
2018-11-08 12:10:15
575
原创 SHA-1加密实现
Copyright © 2018 Joyce_BYAll rights reserved.Contact by Yagnes0126@gmail.com实验原理SHA-1接受一串二进制输入,加密后得到160bit的消息摘要,是一种hash加密。算法的主要过程如下:接收一串比特流,对其进行如下扩展:在比特流尾部添加一个‘1’;在新的比特流的尾部添加[0,512)个‘0’,使得...
2018-11-08 12:06:42
2158
原创 AES-128-CBC-PKCS5PADDING 加解密实现
Author: Joyce_BY, all rights reserved.Contact by email: Yagnes0126@gmail.com本文目的及实验环境1、实现128-bit的AES加解密过程2、python3.7.0,windows10原理及代码整体原理图注意:最后一轮变换没有mixcolumn过程。 数据分组将一开始传入AES算法模块的数据,...
2018-10-25 20:20:18
7338
原创 PHP Intermediate
多维数组一个数组中的值可以是另一个数组,另一个数组的值也可以是一个数组。<?php// 二维数组:$cars = array( array("Volvo",100,96), array("BMW",60,59), array
2018-10-08 08:37:07
422
原创 PHP and HTML Form
PHP 中的 $_GET 和 $_POST 变量用于检索表单中的信息当处理 HTML 表单时,PHP能把来自 HTML 页面中的表单元素自动变成PHP脚本元素。PHP 表单和用户输入form.html<!--当用户填写完上面的表单并点击提交按钮时,表单的数据会被送往名为 "welcome.php" 的 PHP 文件--&am
2018-10-07 20:52:36
145
原创 PHP Basics
Author: Joyce_BY, all rights reserved.Contact by email: Yagnes0126@gmail.comStartphp scripts start by: <?phpend by: ?><?php// code ?>comm
2018-10-07 09:56:09
195
原创 Hill Cipher and a Variant
Hill CipherAuthorized by: Joyce Email: dalinca@icloud.comWhat’s Hill Cipher?the Hill cipher is a polygraphic substitution cipher based on linear algebra. Its encryption function is describ...
2018-09-23 13:03:11
913
1
原创 Hacking Vigenère Cipher
Ciphertext-only Attack to Vigenère Cipherplatform: windows 10 environment: python 3.7.0Pre-knowledgesWhat’s vigenere cipher?The Vigenère cipher is a method of encrypting alphabetic text by u...
2018-09-23 13:02:58
519
原创 Easy Cipher Decryption
Cipher Decryption - Classical Ciphers and Variants authorized by Joyce_BY, all rights reserved.contact by email: Yagnes0126@gmail.comcaesar cipher / shift cipher / Caesar’s cipher / Caesar’...
2018-09-21 21:23:17
400
原创 Database Concepts
MySQL practice records# loginroot@localhost> mysql -uroot -ppassword: ******# check current databases:mysql&amp
2018-09-07 22:36:34
1021
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人