The RSA encryption algorithm implemented in D, free to be used by anyone

2025-05-28 Thread Murilo via Digitalmars-d-learn
I've written a code in D which implements the RSA algorithm, so that others may learn how to do it. Here is the link: https://github.com/MuriloMir/RSA-algorithm](https://github.com/MuriloMir/RSA-algorithm

Re: Passing variadic template parameters AND default call site __FILE__, __LINE__ template parameters.

2025-05-28 Thread monkyyy via Digitalmars-d-learn
On Wednesday, 28 May 2025 at 11:32:53 UTC, Jonathan M Davis wrote: On Wednesday, May 28, 2025 5:04:06 AM Mountain Daylight Time realhet via Digitalmars-d-learn wrote: I've found a way to eliminate !() by using a function: Just FYI, you almost never want to instantiate a template with a file a

Re: Passing variadic template parameters AND default call site __FILE__, __LINE__ template parameters.

2025-05-28 Thread realhet via Digitalmars-d-learn
On Wednesday, 28 May 2025 at 11:32:53 UTC, Jonathan M Davis wrote: On Wednesday, May 28, 2025 5:04:06 AM Mountain Daylight Time realhet via Digitalmars-d-learn wrote: Yes, most of the time I can put __FILE__ and __LINE__ onto a runtime function parameter. But this time it is a requirement: I m

Re: Passing variadic template parameters AND default call site __FILE__, __LINE__ template parameters.

2025-05-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, May 28, 2025 5:04:06 AM Mountain Daylight Time realhet via Digitalmars-d-learn wrote: > I've found a way to eliminate !() by using a function: Just FYI, you almost never want to instantiate a template with a file and line number anyway, because that means that every single template

Re: Passing variadic template parameters AND default call site __FILE__, __LINE__ template parameters.

2025-05-28 Thread realhet via Digitalmars-d-learn
On Wednesday, 28 May 2025 at 10:13:43 UTC, realhet wrote: On Tuesday, 27 May 2025 at 21:16:57 UTC, monkyyy wrote: On Tuesday, 27 May 2025 at 21:07:51 UTC, realhet wrote: I've found a way to eliminate !() by using a function: ```d struct LOCATION_t2 { string location; string toString()

Re: Passing variadic template parameters AND default call site __FILE__, __LINE__ template parameters.

2025-05-28 Thread realhet via Digitalmars-d-learn
On Tuesday, 27 May 2025 at 21:16:57 UTC, monkyyy wrote: On Tuesday, 27 May 2025 at 21:07:51 UTC, realhet wrote: I stay in safety and choose this way: ```d enum _LOCATION_(string FILE=__FILE__, size_t LINE=__LINE__) = FILE~'('~LINE.text~",1)"; enum loc1 = (_LOCATION_!()); enum loc2 = (_LOCAT