FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Raw digest from mango.ciphers?

 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
wyrmchild



Joined: 27 May 2006
Posts: 12
Location: Europe

PostPosted: Tue Jun 13, 2006 7:43 am    Post subject: Raw digest from mango.ciphers? Reply with quote

The hash functions seem to work (at least SHA-1), but I can't access the raw digest as far as I can undestand the code. So, when will it be there (or am I just blind?) I kinda need it for my own project Smile

It's silly that I can only get the hex string of the digest, and not the raw, as it would be much more useful to actual apps.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Wed Jun 14, 2006 10:49 pm    Post subject: Reply with quote

Whoops! Thanks for noting this;

Digest should expose the raw content for you, but doesn't. It looks like the Digest base-class needs a toBinary() method returning a void[], and the various subclasses of that need to implement (and return their own private digest[]).

For example, the Sha0Digest class in cipher.sha0 needs a

Code:
void[] toBinary()
{
     return digest;
}

Next release will have this in; you might patch locally in the interim?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group