Using PyCrypto with Spring Crypto/Spring Security Default Encoders

Spring Crypto Encryptor Details The Spring Crypto module is amazing. Secure defaults using standard interfaces really make it a pleasure to use, and with it being full tested and vetted, it also gives a develoepr the warm fuzzy feelings of nice Java security implentation.

The standard interface is through the class, defined (in version 3.2.0 here (the class API to which this blog post was written in July 2016). Spring Crypto uses AES256 encryption behind the scenes in its out of the box class setup; it's as easy as:

In the above code snippet, the password variable is a passcode, with the salt variable used to create the AES key. It uses 256 bit encryption with the standard calls (depending on your JRE/Java Cryptography Extension (JCE) Setup, make sure to download the appropriate extension). The default AESBytesEncryptor setup generates a 256 bit key (32 bytes) from a salted iteration done 1024 times. Another thing to note …

LA Public Library Overlays, Take 1 redux

I wanted to start a project that would try increase the use of the local LA County library system. To do so, I thought it would be awesome to get more people to stop buying books online and instead checkout books from their local library.I still need to work out some kinks, but I created a github repo that will overlay any links (with ISBN-10 urls -- a small subset) to purchase a book from Amazon to re-direct to the LA County Library website search.For instance, say there are links in the page like the following:City of Dragons by Robin Hobb
O’Reilly’s Information Architecture for the Web (This was highlighted by the librarian when I was asking about API access :P)
Right now there is nothing special about the links. You can hover over them with your mouse to see that they point to Amazon.To see the code in action[If using chrome: Drag this link onto the current tab][With Safari, drag it onto your Bookmarks bar, then click on the bookmarked link][Other browsers: TBD]: COLA Public Amazon…

Blog Code Formatting

Note (2012): This post was about a previous webdesign, and no longer applicable.I finally added code formatting to my blog. I used a completely 'client side' javascript library called syntaxhighlighter, hosted on Google Code. Note that I'm currently linking javascript directly from their web facing SVN repository, so I'm not sure how stable it is (but hosting it on googlepages didn't seem to work (they disallow js linking I believe)).Although it is a technology blog, I thought I posted more code about stuff. I only seem to have two posts where I actually put up any code (But maybe that's because it was horribly formatted?), and they now both have pretty Java and XML formatting: one of these days, I'll find use for a blog again. The whole concept of blogging seems so dead.

My Yahoo! Answers Science Post

I am my dad's personal Yahoo! answers person when it comes to things science and physics. So when I received a question on the dual nature of light and matter, I wrote him back a nice long (LFP!) email in answer. I thought I'd share. Question: Sound travels in waves and needs an "ether" for transmission.
Light is also a wave but doesn't need an ether. Is light in space "wave" or "particle"? because when light bends do particles bend or this this one of the examples of light as wave? Answer: Sound is a pressure wave. It is the compressing of molecules. It is the compression that is the sound.Light is a wave of electromagnetic fields, fields in this case being force representations. The light wave is a constant of nature in which a electric force changing will produce a magnetic force which will cause an electric force in a stable, repeating way traveling forward. There are other places where electricity creates magnetic forces and vice ver…

how i saved my windows xp installation with knoppix

so its true. the difference between a 'digital native' and a 'digital immigrant' is the amount of information that they contribute to the world. I absolutely hate having to wade through google searches to find an answer to my problems, so I try to post here about some of my tech adventures (even though it might be nerdy) hoping that one day a spider would come and crawl/index it and provide answers to people for the same questions I couldn't find answers to!So I tried to upgrade the ATI Radeon drivers on my Windows machine for my old video card (thinking it would improve performance! hah! no.) but I could not get Direct3d to work for my ol' Radeon 9500. After the 26 or so re-boots fiddling with the hardware, the hardware connections and the hardware drivers, something finally happened to my Windows XP OS partition. It got fried.I tried to boot up, but after the BIOS loaded I would get the error: Windows XP could not start because the following file is missin…

The Internets Is Scary Sometimes

Sometimes, you think that you are covered on the internets (all of them!), but then I get an email like this to my primary account: As a courtesy, we are notifying you that XXXXXX users have found the following accounts for you:

   Flickr tmarthal on Flickr
   Digg tmarthal on Digg
   MySpace birddog on MySpace
   Picasa marthaler on Picasa

If you would like to make these accounts private, please
change the privacy settings on the original network and
XXXXXX will update its search results to reflect your changes.

To find your friends on XXXXXX, signup now. I removed the company that sent the email, not sure that I want to encourage this type of email and account harvesting.The point is, that someone, somewhere has correlated my different accounts on my various networks to my single email signon. Someone, somewhere knows my that the articles dugg on digg are associated with the pictures that I post on flikr! So, when I don't post anything, they can check my pictures to find out wha…

Spring Framework Sample Main Method

So my desk-mate* and I were having a conversation about an upcoming coding project, and he remarked how nice it was for someone, somewhere to post a complete sample on their blog for the spiders to index, so that he can find it. So I thought I would also, pay it forward and hopefully someone in like 2012 comes by and needs a sample main method using the spring spring framework for application level dependency injection.Everyone out there seems to have used the MVC and deploying spring based apps in a web server WAR file. Except for this link: Levarage Spring Web development with Offspring. [Offtopic: it uses classes in the com.offspring.* package, like the band's website!] It uses a simple bean file and a main method really close to the following snippet to instantiate (that's my new favorite word) the application using the spring context**: import org.springframework.context.ApplicationContext; import; import …

Dolphins Make Me Happy

Lately, I'm not sure if its part of a seasonal migration or something, but there seems to be a lot more dolphins in the water. And they seem to be a lot more playful. Meaning, they swim under/close to us when we are surfing and jump and twist out of the water pretty frequently. I should get pictures. They also seem to show up when we are surfing right when a huge set is about to roll in, and the dolphins always seem to ride the set waves while I try to survive the overhead+ sets.So anyways, read this today: dolphins showing altruistic tendencies towards a surf and protecting him while in the ocean. So they know we're out there. I wonder if they hear me when I jump in the water and screech back to them. :) </happy>