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

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