pike.git
/
lib
/
modules
/
Crypto.pmod
/
DSA.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Crypto.pmod/DSA.pmod:357:
[object(Gmp.mpz)]([array(object(Object))]a->elements)[1]-> value); } #undef Object // // --- Below are methods for DSA applied in other standards. //
-
-
//! Makes a DSA hash of the
messge
@[msg].
+
//! Makes a DSA hash of the
message
@[msg].
Gmp.mpz hash(string(8bit) msg, .Hash h) { string(8bit) digest = h->hash(msg)[..q->size()/8-1]; return [object(Gmp.mpz)](Gmp.mpz(digest, 256) % q); } protected Gmp.mpz random_number(Gmp.mpz n) { return [object(Gmp.mpz)](Gmp.mpz(random( [int(0..)](q->size() + 10 / 8)), 256) % n);