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

People
Owner: Nobody in particular
Requestors: felipe [...] felipegasper.com
Cc:
AdminCc:

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



X-Source:
MIME-Version: 1.0 (Mac OS X Mail 10.1 \(3251\))
X-Source-Args:
X-Spam-Status: No, score=-2.81 tagged_above=-99.9 required=10 tests=[AWL=-1.020, BAYES_00=-1.9, DKIM_SIGNED=0.1, T_DKIM_INVALID=0.01] autolearn=no
X-Mailer: Apple Mail (2.3251)
X-From-Rewrite: unmodified, already matched
X-Source-Dir:
X-Outgoing-Spam-Status: No, score=-1.0
X-Spam-Flag: NO
Message-ID: <4CD9E40C-2B37-4A12-83F8-1BF715040A90 [...] felipegasper.com>
content-type: text/plain; charset="utf-8"
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Antiabuse: This header was added to track abuse, please include it with any abuse report
X-Antiabuse: Primary Hostname - premium36.web-hosting.com
X-Antiabuse: Original Domain - rt.cpan.org
X-Antiabuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse: Sender Address Domain - felipegasper.com
X-Spam-Score: -2.81
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 5D2D324032B for <cpan-bug+math-bigint [...] hipster.bestpractical.com>; Fri, 2 Dec 2016 03:05:25 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W1Kyrl9joxN2 for <cpan-bug+math-bigint [...] hipster.bestpractical.com>; Fri, 2 Dec 2016 03:05:24 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 5C29C24011E for <bug-math-bigint [...] rt.cpan.org>; Fri, 2 Dec 2016 03:05:24 -0500 (EST)
Received: (qmail 22039 invoked by alias); 2 Dec 2016 08:05:23 -0000
Received: from p36.web-hosting.com (HELO p36.web-hosting.com) (198.54.114.237) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 02 Dec 2016 00:05:21 -0800
Received: from ng2.cptxoffice.net ([208.74.121.106]:6487 helo=[10.1.4.84]) by premium36.web-hosting.com with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_1) (envelope-from <felipe [...] felipegasper.com>) id 1cCiqG-003ww9-CY for bug-math-bigint [...] rt.cpan.org; Fri, 02 Dec 2016 03:05:13 -0500
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=softfail (invalid, public key: not available) header.i= [...] felipegasper.com
Delivered-To: cpan-bug+math-bigint [...] hipster.bestpractical.com
Subject: Feature request: as_byte_string()
Return-Path: <felipe [...] felipegasper.com>
X-RT-Mail-Extension: math-bigint
X-Original-To: cpan-bug+math-bigint [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=felipegasper.com; s=default; h=To:Date:Message-Id:Subject:Mime-Version: Content-Transfer-Encoding:Content-Type:From; bh=kd6K3F18WJ1nVgZ3s08uyv3v+YNERTwbZr6BV9BJ3YI=; b=X1r967+reXCXNBw8bNPSJSWok5 2U+Rb1IiSoQJizZ2j+XXbQ/n6ZxHHGd0tdcy5xRP3wa5wpZ5DmhAQTF/iGAi/J4LwzuuNdZnS/Xso 9fRd2Kzw95FnfiqZvf7AiEHhau42JY60A4o4OiOHittGEvywdQFTegyn6zdRR26AfxiAWW7vNmwoi 8XBW1wUCaQu8PpwqspxYwLaNdq6aZzSzZ+YUKIjwkleCeDJwvEb9Rh2stDDx8QrThviRo9r13V54v pl3qijzMmuyIXSdPDmJGBDyU3b3wY0uy2NPnsm48gGRoUciYDtbdvn1GHvoh1XCZAOv+bKmw+SB0P Ta0vVnrA==;
Date: Fri, 2 Dec 2016 03:05:10 -0500
X-Authenticated-Sender: premium36.web-hosting.com: felipe [...] felipegasper.com
X-Spam-Level:
X-Get-Message-Sender-Via: premium36.web-hosting.com: authenticated_id: fgasper/from_h
To: bug-math-bigint [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: Felipe Gasper <felipe [...] felipegasper.com>
X-RT-Original-Encoding: utf-8
X-RT-Interface: Email
Content-Length: 440
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
MIME-Version: 1.0
In-Reply-To: <4CD9E40C-2B37-4A12-83F8-1BF715040A90 [...] felipegasper.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <4CD9E40C-2B37-4A12-83F8-1BF715040A90 [...] felipegasper.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-16928-1481200080-197.119096-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 118
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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.