MD5Transform.java2011-09-17 09:04:25

OpenAMのJDBC認証時にMD5パスワードを扱いたかったので作ったもの.探がしかたが悪かったのか,適当なものが見つからなかった.ClearTextTransform以外もはじめから用意しててくれればいいのに.

package com.sun.identity.authentication.modules.jdbc;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
 
import com.sun.identity.authentication.spi.AuthLoginException;

public class MD5Transform implements JDBCPasswordSyntaxTransform {

	public MD5Transform() {
		
	}
	@Override
	public String transform(String input) throws AuthLoginException {
		System.out.println(input);
		String result = toMD5HexString(input);
		result = result.trim();
		System.out.println(result);
		return result;
	}
	
	private String toMD5HexString(String source) {
		StringBuilder sb = new StringBuilder();
		 MessageDigest md;
		try {
			md = MessageDigest.getInstance("MD5");

			  byte[] data = source.getBytes();
			  md.update(data);
			            
			  byte[] digest = md.digest();
			            
			  
			  for (int i = 0; i < digest.length; i++) {
				  String hex = Integer.toHexString((int) 0x00FF & digest[i]);
				     if (hex.length() == 1) 
				     {
				        sb.append("0");
				     }
			    sb.append(hex);
			  }
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		}

	return sb.toString();
	}
}

コメント

_ quest bars ― 2015-08-31 01:49:20

This website was... how do I say it? Relevant!! Finally I've found something that helped me. Cheers!

_ quest bars ― 2015-08-31 06:54:16

It's an amazing piece of writing designed for all the web users; they will get benefit from it I am sure.

_ quest bars ― 2015-08-31 16:42:54

I believe this is one of the such a lot important information for me. And i am satisfied studying your article. But wanna commentary on few basic issues, The site taste is perfect, the articles is in reality great : D. Excellent process, cheers

_ quest bars ― 2015-09-02 11:10:06

Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us something enlightening to read?

_ plenty of fish dating site of free dating ― 2015-09-25 12:10:50

hello there and thank you for your info - I have definitely picked up anything new from right here. I did however expertise some technical points using this site, since I experienced to reload the site lots of times previous to I could get it to load properly. I had been wondering if your hosting is OK? Not that I am complaining, but sluggish loading instances times will very frequently affect your placement in google and could damage your quality score if advertising and marketing with Adwords. Anyway I am adding this RSS to my e-mail and can look out for a lot more of your respective fascinating content. Ensure that you update this again soon.

_ Pof Entrar ― 2015-10-18 06:59:36

Thanks for sharing your thoughts about Plenty Of Fish Dating Site Of Free Dating. Regards

_ where to buy quest nutrition bars ― 2015-10-19 00:56:53

When someone writes an article he/she retains the image of a user in his/her mind that how a user can be aware of it. Thus that's why this piece of writing is outstdanding. Thanks!

_ plenty of fish dating site of free dating ― 2015-11-06 04:11:56

Asking questions are in fact nice thing if you are not understanding anything totally, but this piece of writing provides good understanding
even.

_ plenty of fish dating site of free dating ― 2015-11-07 03:34:49

We&#39;re a group of volunteers and opening a new scheme in our community.
Your site provided us with valuable information to work on. You have done an impressive job and
our entire community will be thankful to you.

_ plenty of fish dating site of free dating ― 2015-11-07 09:16:51

Attractive component of content. I simply stumbled upon your web site and
in accession capital to say that I acquire in fact loved account
your weblog posts. Anyway I will be subscribing for your augment
and even I fulfillment you get right of entry to constantly fast.

_ krogerfeedback.com ― 2015-12-06 15:20:28

Hello! Quick question that&#39;s totally off topic.
Do you know how to make your site mobile friendly?
My blog looks weird when browsing from my iphone. I&#39;m
trying to find a theme or plugin that might be able
to fix this issue. If you have any recommendations, please share.
With thanks!

_ tinyurl.com ― 2015-12-07 19:09:26

I&#39;m truly enjoying the design and layout of your website.

It&#39;s a very easy on the eyes which makes it much
more pleasant for me to come here and visit more often. Did you hire out a developer to create your
theme? Fantastic work!

_ krogerfeedback ― 2015-12-11 21:21:37

Hello there, just became alert to your blog through Google, and found that it&#39;s really
informative. I am gonna watch out for brussels.
I&#39;ll appreciate if you continue this in future. Many people will be benefited from your writing.
Cheers!

_ www.krogerfeedback.com ― 2015-12-23 21:51:43

I am extremely impressed with your writing skills as well as with the layout
on your blog. Is this a paid theme or did you modify it yourself?
Either way keep up the nice quality writing, it is rare to
see a nice blog like this one nowadays.

_ quest bars ― 2016-02-09 06:48:56

My spouse and I stumbled over here coming from a different page and thought I should
check things out. I like what I see so now
i&#39;m following you. Look forward to exploring your
web page repeatedly.

_ quest bars ― 2016-02-09 14:28:42

It&#39;s really very complicated in this active life to listen news on TV, so I simply use the web for that
purpose, and obtain the newest news.

_ quest bars ― 2016-02-17 20:53:55

I don&#39;t even know the way I ended up right here, however I thought this submit was great.
I don&#39;t know who you are but definitely you&#39;re going to a well-known blogger if you are not already.
Cheers!

_ plenty of fish dating site of free dating ― 2016-02-23 12:14:15

Way cool! Some very valid points! I appreciate you writing this write-up and also
the rest of the site is extremely good.

_ Limewire Free Music Downloads ― 2016-03-07 22:53:00

Good day! This is my first visit to your blog! We are a group of
volunteers and starting a new project in a community in the same niche.
Your blog provided us useful information to work on. You have done a extraordinary job!

_ bernie sanders ― 2016-03-31 14:28:20

Fastidious replies in return of this difficulty with real arguments and describing all on the topic of that.

_ bernie sanders ― 2016-04-01 17:56:09

Thank you for some other excellent post. The place else could anybody get that kind of info in such a
perfect manner of writing? I have a presentation next week, and
I&#39;m at the search for such info.

_ krogerfeedback.com ― 2016-06-05 19:48:30

Hi there friends, its great post regarding cultureand completely defined, keep it up all the time.

_ t.co ― 2016-07-09 13:32:40

Hello Dear, are you in fact visiting this site on a regular basis,
if so afterward you will without doubt take pleasant know-how.

_ quest bars ― 2016-09-09 03:49:55

Pretty! This has been an incredibly wonderful article. Many thanks for providing these details.

_ Height boosting insoles ― 2016-09-10 08:11:40

I Ƅlg оften and I seriously appreciate your іnformation. The article has truly peaked my interest.
I&#39;m going to book mark your blog and keep checking for new
іnformation about once per week. I subscribed to your RSS feed tоo.

_ plenty of fish dating site of free dating ― 2016-09-10 17:50:38

Admiring the time and energy you put into your blog and
detailed information you provide. It&#39;s good to come
across a blog every once in a while that isn&#39;t the same unwanted
rehashed information. Great read! I&#39;ve bookmarked your site and I&#39;m including your RSS feeds to my Google account.

_ plenty of fish dating site of free dating ― 2016-09-12 00:52:57

Great site you have here.. It&#39;s difficult to find good quality writing like yours nowadays.
I seriously appreciate people like you! Take care!!

_ height boosting insoles for men ― 2016-09-14 07:13:01

Thankѕ a lott for givіng everyone a vеry pleasant chance to ϲheck tips from this blog.
It is аlways so kind and jam-packed with a great tim for me and my office co-workers to ѵisit youг blog on the ⅼeast threᥱ tіmes per
week to study the latest thingѕ you have got. And lɑstly, we are certainly motivatᥱd with all thе superb
informatiⲟn you sᥱrve. Certain 4 points
on this page are unequivoсally the very best I have had.

_ quest bars ― 2016-09-25 13:44:20

Great weblog right here! Additionally your site a
lot up very fast! What web host are you using?
Can I am getting your affiliate hyperlink on your
host? I desire my site loaded up as fast as yours lol

_ minecraft sweet and awesome unblocked ― 2016-10-02 00:31:37

An intriguing discussion is worth comment. I do believe that you should publish more about this
issue, it may not be a taboo subject but generally people don&#39;t talk about such issues.
To the next! Best wishes!!

_ unblocked minecraft sweet and awesome ― 2016-10-03 15:24:04

Magnificent items from you, man. I&#39;ve have in mind your stuff previous to and
you are just too excellent. I really like what you&#39;ve bought right here, really like what you&#39;re
stating and the way in which by which you say it. You make it enjoyable and you still care for to keep it wise.
I can&#39;t wait to read far more from you. That is actually
a tremendous web site.

_ plenty of fish dating site of free dating ― 2016-10-04 23:47:09

First off I want to say superb blog! I had a quick question that I&#39;d like to ask if you do not mind.

I was curious to know how you center yourself and clear your head prior to writing.

I&#39;ve had a tough time clearing my mind in getting my thoughts
out there. I truly do enjoy writing however it just seems
like the first 10 to 15 minutes tend to be lost simply just trying
to figure out how to begin. Any suggestions or tips?

Thanks!

_ como descargar minecraft pocket edition ― 2016-10-12 14:22:34

I&#39;m not sure where you&#39;re getting your information, but great
topic. I needs to spend some time learning more or understanding more.
Thanks for fantastic information I was looking for this information for my mission.

_ descargar juego de minecraft ― 2016-10-14 14:35:17

I couldn&#39;t resist commenting. Well written!

_ gamefly 3 month free trial ― 2016-11-15 16:28:07

Unquestionably imagine that which you stated.
Your favorite reason appeared to be at the web the easiest factor to consider
of. I say to you, I definitely get irked at the same time as folks consider issues that they just do not know
about. You managed to hit the nail upon the top and
also outlined out the whole thing with no need side-effects ,
folks can take a signal. Will likely be again to get more.
Thank you gamefly 3 month free trial

_ gamefly 3 month free trial ― 2016-11-16 13:32:40

Aw, this was an exceptionally nice post. Spending some time and actual
effort to produce a very good article… but
what can I say… I put things off a lot and never manage to
get anything done. Gamefly 3 month free trial

_ quest bar logo ― 2016-11-20 04:20:55

Remarkable things here. I am very satisfied to look your
article. Thanks a lot and I&#39;m taking a look ahead to contact you.

Will you kindly drop me a e-mail?

_ tinyurl.com ― 2016-12-02 00:52:06

Hurrah, that&#39;s what I was looking for, what a stuff!
present here at this weblog, thanks admin of this web page.

_ Gamefly Free Trial ― 2016-12-18 12:51:38

Hello to every single one, it&#39;s really a good for me to go to see this web site, it consists of priceless Information.

_ Gamefly Free Trial ― 2016-12-19 01:55:23

Keep this going please, great job!

_ Gamefly Free Trial ― 2016-12-20 06:51:28

Post writing is also a fun, if you know after that you can write
otherwise it is complicated to write.

_ Gamefly ― 2016-12-21 12:20:21

Great goods from you, man. I have understand your stuff
previous to and you are just too magnificent. I really like what you have acquired here, certainly
like what you are saying and the way in which you say it.
You make it entertaining and you still care for to keep
it smart. I can&#39;t wait to read much more from you.
This is actually a great site.

_ www.krogerfeedback.com ― 2016-12-24 18:12:21

Hi! Do you use Twitter? I&#39;d like to follow you if that would be okay.
I&#39;m undoubtedly enjoying your blog and look forward to new posts.

_ www.krogerfeedback.com ― 2016-12-25 01:47:50

Hi everybody, here every one is sharing these knowledge, therefore it&#39;s good to read this website, and I used to go to see this weblog daily.

_ www.krogerfeedback.com ― 2016-12-26 00:33:01

When someone writes an article he/she retains the idea of a user in his/her
brain that how a user can understand it. So that&#39;s why this
paragraph is perfect. Thanks!

_ www.krogerfeedback.com ― 2016-12-26 01:19:10

Thanks for every other magnificent post. The place else may just anybody
get that kind of info in such a perfect way of
writing? I have a presentation subsequent week, and I&#39;m at the look for such info.

_ plenty of fish dating site of free dating ― 2016-12-27 16:02:37

You&#39;re so awesome! I do not think I&#39;ve truly read through something like this before.
So nice to discover somebody with some genuine thoughts on this subject matter.
Seriously.. many thanks for starting this up. This website is something
that is needed on the web, someone with a bit of originality!

_ free dating sites no fees ― 2017-01-06 04:02:30

Every weekend i used to visit this web site, because i wish for enjoyment, as this this web site conations genuinely nice funny data too.

_ free dating sites no fees ― 2017-01-06 17:11:37

Pretty great post. I simply stumbled upon your blog and wished to mention that I have truly loved surfing around your blog posts.

In any case I will be subscribing in your rss feed and I hope you write once more soon!

_ free dating sites for women ― 2017-01-07 21:55:46

Have you ever considered publishing an ebook or guest authoring on other
sites? I have a blog based on the same topics you discuss and would love to have you share
some stories/information. I know my visitors would appreciate
your work. If you&#39;re even remotely interested, feel free to send me an email.

※コメントの受付件数を超えているため、この記事にコメントすることができません。

トラックバック

このエントリのトラックバックURL: http://mhrz.asablo.jp/blog/2011/09/17/6105293/tb