From 53d1d37f0242eb700a8210bd6ce673af58e69809 Mon Sep 17 00:00:00 2001 From: Martin Nilsson <nilsson@opera.com> Date: Sat, 26 Apr 2014 15:36:47 +0200 Subject: [PATCH] Added _sprintf --- lib/modules/Crypto.pmod/DSA.pike | 6 ++++++ lib/modules/Crypto.pmod/RSA.pike | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/lib/modules/Crypto.pmod/DSA.pike b/lib/modules/Crypto.pmod/DSA.pike index 0a51d5a16f..83d01b18f7 100644 --- a/lib/modules/Crypto.pmod/DSA.pike +++ b/lib/modules/Crypto.pmod/DSA.pike @@ -8,6 +8,12 @@ inherit Crypto.Sign; +protected string _sprintf(int t) +{ + return t=='O' && sprintf("%O(%d,%d)", this_program, sizeof(p->digits(2)), + sizeof(q->digits(2))); +} + // // --- Variables and accessors // diff --git a/lib/modules/Crypto.pmod/RSA.pike b/lib/modules/Crypto.pmod/RSA.pike index 1a47196dbe..1f98d28b05 100644 --- a/lib/modules/Crypto.pmod/RSA.pike +++ b/lib/modules/Crypto.pmod/RSA.pike @@ -8,6 +8,11 @@ inherit Crypto.Sign; +protected string _sprintf(int t) +{ + return t=='O' && sprintf("%O(%d)", this_program, size*8); +} + // // --- Variables and accessors // -- GitLab