Thread overview
std.bigint: BigInt conversion
Nov 25, 2012
novice2
Nov 25, 2012
Stian
Dec 03, 2012
novice2
Dec 03, 2012
bearophile
November 25, 2012
How i can convert ubyte[] to BigInt and BigInt to ubyte[] ?
Or uint[]...

For example, i need RSA crypto. I should get ubyte[] data, ubyte[] key, convert it to BigInt, calculate, then save result as ubyte[] data again.

But i see BigInt convertable to string only :(
November 25, 2012
On Sunday, 25 November 2012 at 21:36:38 UTC, novice2 wrote:
> How i can convert ubyte[] to BigInt and BigInt to ubyte[] ?
> Or uint[]...
>
> For example, i need RSA crypto. I should get ubyte[] data, ubyte[] key, convert it to BigInt, calculate, then save result as ubyte[] data again.
>
> But i see BigInt convertable to string only :(

If you look in https://github.com/apartridge/crypto you'll find both an altered BigInt and RSA skeleton. I think you'll find what you are looking for.
December 03, 2012
Big thank you. I hope, this changes will be included in phobos in future.
December 03, 2012
novice2:

> I hope, this changes will be included in phobos in future.

Sometimes hoping isn't enough. If you have a need that youi think should be in Phobos, then I think you should ask for it in Bugzilla. Asking isn't equal to someone actually implementing it, but in this early stage of the life of Phobos knowing what's needed is a very interesting information.

Bye,
bearophile