Use ascii to encrypt strings and ascii to encrypt strings

Source: Internet
Author: User

Use ascii to encrypt strings and ascii to encrypt strings

Algorithm: replace the original letter with the fourth letter after the original letter.
Plaintext: China ciphertext: Glmre

# Include <stdio. h> int main () {char c1, c2, c3, c4, c5; c1 = 'C'; c2 = 'H'; c3 = 'I '; c4 = 'n'; c5 = 'a'; c1 + = 4; // convert the character of c1 to ascii code plus 4 and then assign c1 c2 + = 4; // convert the c2 character into an ascii code plus 4 and then assign it to c2 itself c3 + = 4; // convert the c3 character into an ascii code plus 4 and then assign the c3 c4 + = 4; // convert c4 characters into ascii codes plus 4 and then assign c4 c5 + = 4; // convert c5 characters into ascii codes plus 4 and then assign them to c5 putchar (c1); putchar (c2); putchar (c3); putchar (c4 ); putchar (c5); printf ("\ n % c \ n", c1, c2, c3, c4, c5); return 0 ;}

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.