Thread overview | ||||||
---|---|---|---|---|---|---|
|
November 25, 2012 std.bigint: BigInt conversion | ||||
---|---|---|---|---|
| ||||
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 Re: std.bigint: BigInt conversion | ||||
---|---|---|---|---|
| ||||
Posted in reply to novice2 | 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 Re: std.bigint: BigInt conversion | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stian | Big thank you. I hope, this changes will be included in phobos in future. |
December 03, 2012 Re: std.bigint: BigInt conversion | ||||
---|---|---|---|---|
| ||||
Posted in reply to novice2 | 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
|
Copyright © 1999-2021 by the D Language Foundation