GNU bug report logs - #7313
sha1sum etc, output in base64

Previous Next

Package: coreutils;

Reported by: Caleb Cushing <xenoterracide <at> gmail.com>

Date: Tue, 2 Nov 2010 13:26:04 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7313 in the body.
You can then email your comments to 7313 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7313; Package coreutils. (Tue, 02 Nov 2010 13:26:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Caleb Cushing <xenoterracide <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 02 Nov 2010 13:26:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Caleb Cushing <xenoterracide <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: sha1sum etc, output in base64
Date: Tue, 2 Nov 2010 08:16:39 -0500
I'd like to be able to do something like this

sha1sum --base64

and instead of getting a hex representation get a base64 representation.

An alternative might be

sha1sum --raw | base64

obviously this applies to md5sum, sha512sum, etc

-- 
Caleb Cushing

http://xenoterracide.com




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7313; Package coreutils. (Tue, 02 Nov 2010 16:16:02 GMT) Full text and rfc822 format available.

Message #8 received at 7313 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Caleb Cushing <xenoterracide <at> gmail.com>
Cc: 7313 <at> debbugs.gnu.org
Subject: Re: bug#7313: sha1sum etc, output in base64
Date: Tue, 02 Nov 2010 16:20:05 +0000
On 02/11/10 13:16, Caleb Cushing wrote:
> I'd like to be able to do something like this
> 
> sha1sum --base64
> 
> and instead of getting a hex representation get a base64 representation.
> 
> An alternative might be
> 
> sha1sum --raw | base64
> 
> obviously this applies to md5sum, sha512sum, etc

This is one of those border line cases.
I'm 40:60 against adding it as it seems easy enough
to acheive using existing tools:

env printf $(sha1sum file | sed 's/ .*//; s/\(..\)/\\x\1/g') | base64

Note using env above is to bypass the inbuilt printf
which doesn't support \x on dash for example.

cheers,
Pádraig.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7313; Package coreutils. (Tue, 02 Nov 2010 17:12:01 GMT) Full text and rfc822 format available.

Message #11 received at 7313 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Caleb Cushing <xenoterracide <at> gmail.com>
Cc: 7313 <at> debbugs.gnu.org
Subject: Re: bug#7313: sha1sum etc, output in base64
Date: Tue, 02 Nov 2010 17:15:40 +0000
On 02/11/10 16:20, Pádraig Brady wrote:
> env printf $(sha1sum file | sed 's/ .*//; s/\(..\)/\\x\1/g') | base64

I just dug out an old script of mine that did
low level manipulations like this, and I had used:

openssl dgst -sha1 -binary $file | openssl enc -base64

While that does show there is a need for this,
it also shows there are widely available tools
to do it already.

cheers,
Pádraig.




Information forwarded to bug-coreutils <at> gnu.org:
bug#7313; Package coreutils. (Wed, 10 Oct 2018 19:11:02 GMT) Full text and rfc822 format available.

Message #14 received at 7313 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Pádraig Brady <P <at> draigBrady.com>,
 Caleb Cushing <xenoterracide <at> gmail.com>
Cc: 7313 <at> debbugs.gnu.org
Subject: Re: bug#7313: sha1sum etc, output in base64
Date: Wed, 10 Oct 2018 13:10:25 -0600
close 7313
stop

(triaging old bugs)

Hello,

On 02/11/10 11:15 AM, Pádraig Brady wrote:
> On 02/11/10 16:20, Pádraig Brady wrote:
>> env printf $(sha1sum file | sed 's/ .*//; s/\(..\)/\\x\1/g') | base64
> 
> openssl dgst -sha1 -binary $file | openssl enc -base64
> 

And also:

 sha1sum FILE | xxd -r -p | base64



With no further comments in the last 7 years,
I'm closing this bug.

regards,
 - assaf




bug closed, send any further explanations to 7313 <at> debbugs.gnu.org and Caleb Cushing <xenoterracide <at> gmail.com> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 10 Oct 2018 19:11:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 08 Nov 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.