digitalmars.D.learn - std.bigint: BigInt conversion
- "novice2" <sorry noem.ail> Nov 25 2012
- "Stian" <stian.pedersen gmail.com> Nov 25 2012
- "novice2" <sorry noem.ail> Dec 03 2012
- "bearophile" <bearophileHUGS lycos.com> Dec 03 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 :(
Nov 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.
Nov 25 2012
Big thank you. I hope, this changes will be included in phobos in future.
Dec 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
Dec 03 2012









"Stian" <stian.pedersen gmail.com> 