-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I modified the sample code from tests/ac.c to encrypt a string instead of an
unsigned integer, but I get an error with this new code.
The original code from tests/ac.c is (a is the unsigned integer):
x = gcry_mpi_new (0);
gcry_mpi_set_ui (x, a);
if (gcry_ac_data_encrypt (hd, GCRY_AC_FLAG_DATA_NO_BLINDING, pubKey, x,
&data))
{
}
I replaced the code for setting the MPI value:
char text[] = "Dies ist ein Test-String.";
x = gcry_mpi_new (0);
gcry_mpi_set_opaque (x, text, strlen(text));
if (gcry_ac_data_encrypt (hd, GCRY_AC_FLAG_DATA_NO_BLINDING, pubKey, x,
&data))
{
}
When I execute this code I get a core dump and an error message:
Ohhhh jeeee: ... this is a bug (sexp.c:1046:sexp_sscan)
Did I really find a bug or did I make a mistake within my code? Would be great
if someone could help me in encrypting string data.
Thanks in advance,
Ralf.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE/Fop57YyyfykA0YkRAtZXAJwLd9C/JRsj1Bn0lX+zYunu5IerMQCfcVIg
K87MBEzNaB+8hIdilEbaI48=
=HKqQ
-----END PGP SIGNATURE-----
Hash: SHA1
Hi,
I modified the sample code from tests/ac.c to encrypt a string instead of an
unsigned integer, but I get an error with this new code.
The original code from tests/ac.c is (a is the unsigned integer):
x = gcry_mpi_new (0);
gcry_mpi_set_ui (x, a);
if (gcry_ac_data_encrypt (hd, GCRY_AC_FLAG_DATA_NO_BLINDING, pubKey, x,
&data))
{
}
I replaced the code for setting the MPI value:
char text[] = "Dies ist ein Test-String.";
x = gcry_mpi_new (0);
gcry_mpi_set_opaque (x, text, strlen(text));
if (gcry_ac_data_encrypt (hd, GCRY_AC_FLAG_DATA_NO_BLINDING, pubKey, x,
&data))
{
}
When I execute this code I get a core dump and an error message:
Ohhhh jeeee: ... this is a bug (sexp.c:1046:sexp_sscan)
Did I really find a bug or did I make a mistake within my code? Would be great
if someone could help me in encrypting string data.
Thanks in advance,
Ralf.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE/Fop57YyyfykA0YkRAtZXAJwLd9C/JRsj1Bn0lX+zYunu5IerMQCfcVIg
K87MBEzNaB+8hIdilEbaI48=
=HKqQ
-----END PGP SIGNATURE-----