In general, if I have something like this:
struct pippo {
ushort a;
ushort b;
ubyte[170] c;
uint d;
}
void do_something(void []);
What is the right way to pass pippo to do_something() ? something like #2 ?

That RSAEncryptedData.sizeof should be 1, since you're slicing a value
of type RSAEncryptedData*.

return 0;
}
I got an Assertion failure on the 3° assert, where I have tried to cast
buf directly to void[].
In general, if I have something like this:
struct pippo {
ushort a;
ushort b;
ubyte[170] c;
uint d;
}
void do_something(void []);
What is the right way to pass pippo to do_something() ? something like #2 ?

My preferred way is something like
---
pippo somevar;
// ... initialize
do_something((&somevar)[0..1]);
---
(The inner brackets may be superfluous, but I'm not sure. My rule of
thumb in such cases is to always put them in there, because even if the
code does exactly the same they make it more clear what's happening)