Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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

 
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic