File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes [Spring Security] Where can I find Base64 usage in spring codebase? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "[Spring Security] Where can I find Base64 usage in spring codebase?" Watch "[Spring Security] Where can I find Base64 usage in spring codebase?" New topic
Author

[Spring Security] Where can I find Base64 usage in spring codebase?

Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
Code snippet from applicationContext-security.xml



Spring will get the password , will apply SHA-512 and then encode with base64. As there are many implementation available of base64 encoding like sun.misc.Base64Encoder or Apache commons codec, I want to find out which one Spring security is using internally. I know this sounds lame but I do not know how to find.

I am using Spring Security 2.0.4.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

They are using their own implementation - org.springframework.security.core.codec.Base64


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
Spring versions that I am using are,

Spring : 2.5.6
Spring Security : 2.0.4

and the page into given link states , since 3.0

/**
* Base64 encoder which is a reduced version of Robert Harder's public domain implementation.
* See http://iharder.net/base64 for more information.
*


* For internal use only.
*
* @author Luke Taylor
* @since 3.0
*/



Another thing is, that implementation has Maximum line length (76) of Base64 output. Does it truncate of the output if large than 76 characters? or what characters it appends after 76the characters.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Spring Security] Where can I find Base64 usage in spring codebase?
 
Similar Threads
Using other Authentication Providers
Spring Security 3: Salting password issue
Spring Security - Choosing Authentication Provider at runtime
Integrating Spring & JDBC into JSF2 login page
[Spring Security] SHA-512 , UserDetailService, User - authentication not working