public ActionResult <string> Get(string value)
 {
     CriptoModelObj.ValueDecript  = BlowFishWrapper.Decrypt(value);
     CriptoModelObj.ValueOriginal = value;
     CriptoModelObj.ValueEncript  = BlowFishWrapper.Encrypt(CriptoModelObj.ValueDecript);
     return(JsonConvert.SerializeObject(CriptoModelObj));
 }
Example #2
0
        public static string RunTest(string texto)
        {
            var textoCript   = BlowFishWrapper.Encrypt(texto);
            var textoDescrip = BlowFishWrapper.Decrypt(textoCript);

            return(textoDescrip);
        }
Example #3
0
 public ActionResult <Mensagem> Criptografar([FromBody] Mensagem value)
 {
     lock (this)
     {
         var textoCript = BlowFishWrapper.Encrypt(value.mensagem);
         return(Ok(new Mensagem
         {
             mensagem = textoCript
         }));
     }
 }