title: Javascript Error using cryptico library for decryption
body: <p>I have a string let's say <strong>choice="text to encrypt and decrypt"</strong>
  I am using a public key I produced with another program to encrypt and it works fine. I get the cipher text and try to decrypt it, but I am getting the following error.</p>
  
  <pre><code>script.js:282 the pub key is : 021e645806ee84055b51------675e75f93d41c407b7826cf1e76c10aaa05dfc8e
  script.js:291 the cipher text is: gkEJlPREx/EVPUue3vWlDWImilRrnyUmeNpkvSbY1vVLqf6IYoBqk9H/PBwXXck++Q==?T+kht1n981qDPmJc7H3DrFxqRi2oe6OFu60ASI389Rg=
  script.js:303 the priv key is : 2293f6d33--------f37cc02674edec14eae9586c4fab5bd2a89631f10237b13
  cryptico.js:3499 Uncaught TypeError: ciphertext.split is not a function
      at Object.my.decrypt (cryptico.js:3499)
      at Object.success (script.js:306)
      at u (jquery.min.js:2)
      at Object.fireWith [as resolveWith] (jquery.min.js:2)
      at k (jquery.min.js:2)
      at XMLHttpRequest.&lt;anonymous&gt; (jquery.min.js:2)
  </code></pre>
  
  <p>and when I look for the error it stops at the second line of the decrypt function</p>
  
  <pre><code>my.decrypt = function(ciphertext, key)
      {
          var cipherblock = ciphertext.split("?");
          var aeskey = key.decrypt(my.b64to16(cipherblock[0]));}
  </code></pre>
  
  <p>I understand that the cipher code splits on the <strong>"?"</strong> but I can see that I have it in my cipher code. What can be wrong? 
  p.s. I added the dashes to the keys replacing the original values</p>
  
  <p><strong>@UPDATE</strong> </p>
  
  <p>I used the example from this page <a href="https://github.com/wwwtyro/cryptico" rel="nofollow noreferrer">https://github.com/wwwtyro/cryptico</a> and I was getting the same error. So I changed the code as follows</p>
  
  <pre><code>let EncryptionResult = cryptico.encrypt(choice, pub_key);
  let DecryptionResult = cryptico.decrypt(EncryptionResult.cipher, priv_key);
  </code></pre>
  
  <p>Now it passes the original error but I am getting a second error</p>
  
  <pre><code>cryptico.js:3500 Uncaught TypeError: key.decrypt is not a function
      at Object.my.decrypt (cryptico.js:3500)
      at Object.success (script.js:303)
      at u (jquery.min.js:2)
      at Object.fireWith [as resolveWith] (jquery.min.js:2)
      at k (jquery.min.js:2)
      at XMLHttpRequest.&lt;anonymous&gt; (jquery.min.js:2)
      enter code here
  </code></pre>
  
  <p>and it stops at the second line <strong>var aeskey = key.decrypt(my.b64to16(cipherblock[0]));</strong> . Does this have to do anything with base64?? My keys are hex encoded, I don't know if this helps.</p>