Codebase list libcryptx-perl / 1489dbf
DSA size/size_q cosmetics Karel Miko 6 years ago
2 changed file(s) with 8 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
140140 size(Crypt::PK::DSA self)
141141 CODE:
142142 if (self->key.type == -1 || self->key.qord <= 0) XSRETURN_UNDEF;
143 RETVAL = mp_unsigned_bin_size(self->key.g);
143 RETVAL = mp_unsigned_bin_size(self->key.p);
144144 OUTPUT:
145145 RETVAL
146146
148148 size_q(Crypt::PK::DSA self)
149149 CODE:
150150 if (self->key.type == -1 || self->key.qord <= 0) XSRETURN_UNDEF;
151 RETVAL = self->key.qord;
151 RETVAL = mp_unsigned_bin_size(self->key.q);
152152 OUTPUT:
153153 RETVAL
154154
472472 =head2 size
473473
474474 my $size = $pk->size;
475 # returns key size in bytes or undef if no key loaded
475 # returns key size (length of the prime p) in bytes or undef if key not loaded
476
477 =head2 size_q
478
479 my $size = $pk->size_q;
480 # returns length of the prime q in bytes or undef if key not loaded
476481
477482 =head2 key2hash
478483