How to properly base64-encode a buffer

2011-12-17 Thread pf
g at once, or do I have to create a loop here? **: Is it correct to have the type "unsigned char*" or must I use "char *" instead? -- View this message in context: http://old.nabble.com/How-to-properly-base64-encode-a-buffer-tp32995002p32995002.html Sent from the OpenSSL - User

Re: base64 encode of sha1

2006-10-19 Thread Kaushalye Kapuruge
implementation. -- MessageDigest md = MessageDigest.getInstance("SHA1"); md.reset(); md.update("abcde".getBytes()); System.out.println(Base64.encode(md.digest())); (C) Javascript var res= b64_sha1("abcde

Re: base64 encode of sha1

2006-10-19 Thread Kaushalye Kapuruge
MessageDigest md = MessageDigest.getInstance("SHA1"); md.reset(); md.update("abcde".getBytes()); System.out.println(Base64.encode(md.digest())); (C) Javascript var res= b64_sha1("abcde"); [Have to include the

Re: base64 encode of sha1

2006-10-19 Thread Witek
essageDigest md = MessageDigest.getInstance("SHA1"); md.reset(); md.update("abcde".getBytes()); System.out.println(Base64.encode(md.digest())); (C) Javascript var res= b64_sha1("abcde"); [Have to include the scrip

Re: base64 encode of sha1

2006-10-19 Thread Girish Venkatachalam
On Thu, Oct 19, 2006 at 12:14:55PM +0530, Kaushalye Kapuruge wrote: > Hi, > I tried to get the base64 encoded result of a SHA1 digest. But the > result is not compatible with the same operation in Java. Also I tried > to use a javascript function. It is matching with the result of the Java > imp

base64 encode of sha1

2006-10-18 Thread Kaushalye Kapuruge
tInstance("SHA1"); md.reset(); md.update("abcde".getBytes()); System.out.println(Base64.encode(md.digest())); (C) Javascript var res= b64_sha1("abcde"); [Have to include the script file <tt>src="<a r

Re: base64 encode/decode

2005-11-02 Thread Nils Larsch
Patrick Guio wrote: ... I think there is a typo in the code snippet on the webpage http://www.openssl.org/docs/crypto/BIO_f_base64.html# The statement while((inlen = BIO_read(bio, inbuf, 512) > 0) should read while((inlen = BIO_read(bio, inbuf, 512)) > 0) I've committed a fix for the underlying

RE: base64 encode/decode

2005-11-01 Thread Adam Jones
Thanks! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Guio Sent: Tuesday, November 01, 2005 9:51 AM To: Adam Jones Cc: openssl-users@openssl.org Subject: RE: base64 encode/decode On Tue, 1 Nov 2005, Adam Jones wrote: > I had the same prob

RE: base64 encode/decode

2005-11-01 Thread Patrick Guio
to be std::string if you are interesting. Sincerely, Patrick int main() { string message("Hello World \n"); cout << "Start Encoding" << endl; cout << "Message to Base64 Encode - " << message << endl; BIO * b64 = BIO_new

RE: base64 encode/decode

2005-11-01 Thread Adam Jones
]; char message[] = "Hello World \n"; int nLoop = 0; int inlen; cout << "Start Encoding" << endl; cout << "Messege to Base64 Encode - " << message << endl; b64 = BIO_new(BIO_f_base64()); b

base64 encode/decode

2005-11-01 Thread Patrick Guio
Dear all, I am trying to base64-encode/decode a string using the BIO API. The man page for BIO_f_base64 provides examples to "base64 encode a string and write the result to standard output" and "read base64 encoded data from standard input and write the decoded data to standar

RE: Base64 encode/decode

2001-09-16 Thread Daniel Garcia
Is it possible to decode a base64 string( in this case a CSR), change some plain characters such as the State value, and then encode it again? I'm trying to do this with PERL using the MIME:Base64 module. However, everytime i encode it again the CSR seems to become corrupt because 'openssl r

Re: Base64 encode.

2000-10-20 Thread Dr S N Henson
Carles Xavier Munyoz Baldó wrote: > > Hi, > I have a C program that uses the openssl library. > I need to encode a string in base64. > Is there any function in the openssl library to do that ? > What is its sintaxis ? > Well one documented way is to use a base64 BIO. Check out the BIO_f_base64(