Ejemplo n.º 1
0
        public string Encriptar(string texto)
        {
            UTF8Encoding ByteConverter = new UTF8Encoding();

            byte[] textoBytes = ByteConverter.GetBytes(texto);

            byte[] cifradoBytes = rsa.Encrypt(textoBytes, true);

            return(Encriptacion.ByteArrayToStringHex(cifradoBytes));
        }