• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are using their own implementation - org.springframework.security.core.codec.Base64
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic