com.atlassian.user.impl.osuser.security.password
Class OSUPasswordEncryptor

java.lang.Object
  extended bycom.atlassian.user.impl.osuser.security.password.OSUPasswordEncryptor
All Implemented Interfaces:
PasswordEncryptor

public class OSUPasswordEncryptor
extends java.lang.Object
implements PasswordEncryptor

Password digester based on BouncyCastle's SHA1-512 implementation

Author:
Victor Salaman (salaman@qoretech.com)

Field Summary
protected  long H1
           
protected  long H2
           
protected  long H3
           
protected  long H4
           
protected  long H5
           
protected  long H6
           
protected  long H7
           
protected  long H8
           
 
Constructor Summary
  OSUPasswordEncryptor()
           
protected OSUPasswordEncryptor(OSUPasswordEncryptor t)
           
 
Method Summary
static byte[] digest(byte[] input)
           
 int doFinal(byte[] out, int outOff)
           
 java.lang.String encrypt(java.lang.String unencryptedPassword)
           
 void finish()
           
 int getDigestSize()
           
 void init(java.util.HashMap args)
          Deprecated. since 13 March 2007, use constructor instead.
protected  void processBlock()
           
protected  void processLength(long lowW, long hiW)
           
protected  void processWord(byte[] in, int inOff)
           
 void reset()
           
protected  void unpackWord(long word, byte[] out, int outOff)
           
 void update(byte in)
           
 void update(byte[] in, int inOff, int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

H1

protected long H1

H2

protected long H2

H3

protected long H3

H4

protected long H4

H5

protected long H5

H6

protected long H6

H7

protected long H7

H8

protected long H8
Constructor Detail

OSUPasswordEncryptor

public OSUPasswordEncryptor()

OSUPasswordEncryptor

protected OSUPasswordEncryptor(OSUPasswordEncryptor t)
Method Detail

digest

public static byte[] digest(byte[] input)

getDigestSize

public int getDigestSize()

doFinal

public int doFinal(byte[] out,
                   int outOff)

finish

public void finish()

reset

public void reset()

update

public void update(byte in)

update

public void update(byte[] in,
                   int inOff,
                   int len)

processBlock

protected void processBlock()

processLength

protected void processLength(long lowW,
                             long hiW)

processWord

protected void processWord(byte[] in,
                           int inOff)

unpackWord

protected void unpackWord(long word,
                          byte[] out,
                          int outOff)

encrypt

public java.lang.String encrypt(java.lang.String unencryptedPassword)
Specified by:
encrypt in interface PasswordEncryptor
Returns:
an encrypted version of the original String unencryptedPassword

init

public void init(java.util.HashMap args)
Deprecated. since 13 March 2007, use constructor instead.

Specified by:
init in interface PasswordEncryptor
See Also:
PasswordEncryptor.init(HashMap)


Copyright © 2005-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.