Knopflerfish OSGi 5.2.0

org.knopflerfish.service.um.useradmin
Class PasswdUtil

java.lang.Object
  extended by org.knopflerfish.service.um.useradmin.PasswdUtil

public class PasswdUtil
extends java.lang.Object

Utility class for one-way encryption of, for example, user passwords.

Version:
$Revision: 1.1.1.1 $
Author:
Gatespace AB

Constructor Summary
PasswdUtil()
           
 
Method Summary
static byte[] digest(java.lang.String message, byte[] salt)
          Create a digest from salt and a message.
static byte[] saltAndDigest(java.lang.String message, byte[] digest)
          Create salt and the a digest of the salt and the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswdUtil

public PasswdUtil()
Method Detail

saltAndDigest

public static byte[] saltAndDigest(java.lang.String message,
                                   byte[] digest)
Create salt and the a digest of the salt and the message.

Parameters:
message - the message to calculate a digest for
digest - buffer to write the resulting digest to, must be at least 20 bytes long.
Returns:
the salt used when calculating the digest.

digest

public static byte[] digest(java.lang.String message,
                            byte[] salt)
Create a digest from salt and a message.

Parameters:
message - the message to calculate a digest for
salt - the salt to use.
Returns:
the resulting digest, will be 20 bytes long.

Knopflerfish OSGi 5.2.0