title: Program to encrypt / decrypt text string in Assembly MIPS
body: <p>I want to create a program that reads in input a string of characters, and through a predefined action (I was thinking of a sum with an integer randomly generated) encrypts the string by returning the encrypted string and the key to decode it in a second moment.</p>
  <p>Could you give me any suggestions on how to treat the string?</p>
  <p>I would like to do so :</p>
  <pre><code>li $v0,8
  la $a0,buffer
  li $a1,1024
  syscall
  
  move $s7,$a0
  </code></pre>
  <p>This is the code to read the string.
  After that I want to do:</p>
  <pre><code>add $t0,$s5,$s3
  </code></pre>
  <p>When I add a random generated integer to the register contain the string.</p>
  <p>After knowing the values ​​of the random number and the sum, I can again get the original string with a subtraction.</p>
  <p>Is it a proper method?</p>