Skip Menu |

This queue is for tickets about the Math-BigInt CPAN distribution.

Report information
The Basics
Id: 119096
Status: resolved
Priority: 0/
Queue: Math-BigInt

Owner: Nobody in particular
Requestors: felipe [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Feature request: as_byte_string()
Date: Fri, 2 Dec 2016 03:05:10 -0500
To: bug-math-bigint [...]
From: Felipe Gasper <felipe [...]>
Download (untitled) / with headers
text/plain 440b
sub as_byte_string { my ($self) = @_; my $hex = $self->as_hex(); $hex =~ s<\A0x><>; #Ensure that we have an even number of hex digits. if (length($hex) % 2) { substr($hex, 0, 0) = '0'; } return pack 'H*', $hex; } I’m sure there’s a more efficient means of doing this than the above! It’s useful for crypto stuff and would be great to have upstream. Thanks! -Felipe Gasper Mississauga, Ontario
Download (untitled) / with headers
text/plain 118b
Implemented as_bytes() and from_bytes() in Math::BigInt v1.999804. Currently, only big endian byte order is supported.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to