org.mailster.pop3.commands.auth
Class AuthCramMD5Command
java.lang.Object
org.mailster.pop3.commands.Pop3Command
org.mailster.pop3.commands.MultiStatePop3Command
org.mailster.pop3.commands.auth.AuthAlgorithmCommand
org.mailster.pop3.commands.auth.AuthCramCommand
org.mailster.pop3.commands.auth.AuthCramMD5Command
public class AuthCramMD5Command
- extends AuthCramCommand
---
Mailster (C) 2007-2009 De Oliveira Edouard
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 675 Mass
Ave, Cambridge, MA 02139, USA.
See Mailster
Web Site
---
AuthCramMD5Command.java - The POP3 AUTH CRAM-MD5 command (see RFCs 1734 & 2195).
- Version:
- $Revision: 1.4 $, $Date: 2008/12/06 13:57:16 $
- Author:
- Edouard De Oliveira
|
Field Summary |
private static MD5 |
md5
|
|
Method Summary |
java.lang.String |
hmacHash(byte[] text,
byte[] secret)
The HMAC_MD5, according to RFC 2104, transform looks like :
MD5(K XOR opad, MD5(K XOR ipad, text))
where K is a n byte key, ipad is the byte 0x36 repeated 64 times
opad is the byte 0x5c repeated 64 times |
static java.lang.String |
hmacMD5(byte[] text,
byte[] secret)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
md5
private static MD5 md5
AuthCramMD5Command
public AuthCramMD5Command()
hmacHash
public java.lang.String hmacHash(byte[] text,
byte[] secret)
- The HMAC_MD5, according to RFC 2104, transform looks like :
MD5(K XOR opad, MD5(K XOR ipad, text))
where K is a n byte key, ipad is the byte 0x36 repeated 64 times
opad is the byte 0x5c repeated 64 times
- Specified by:
hmacHash in class AuthCramCommand
- Parameters:
text - is the data being protectedsecret - is the secret key
- Returns:
- the hex string representation of the HMAC_MD5 transformation
hmacMD5
public static java.lang.String hmacMD5(byte[] text,
byte[] secret)