anon.crypto.tinytls.util
Class PRF

java.lang.Object
  extended by anon.crypto.tinytls.util.PRF

public class PRF
extends java.lang.Object

Author:
stefan a Pseudo Radnom Function as described in RFC2246

Field Summary
private  byte[] m_label
           
private  byte[] m_secret
           
private  byte[] m_seed
           
 
Constructor Summary
PRF(byte[] secret, byte[] label, byte[] seed)
          Constructor for a Pseudo Random Function
 
Method Summary
 byte[] calculate(int length)
          calculates the result of a pseudo random function
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_secret

private byte[] m_secret

m_seed

private byte[] m_seed

m_label

private byte[] m_label
Constructor Detail

PRF

public PRF(byte[] secret,
           byte[] label,
           byte[] seed)
Constructor for a Pseudo Random Function

Parameters:
secret - a secret
label - a label
seed - a seed
Method Detail

calculate

public byte[] calculate(int length)
calculates the result of a pseudo random function

Parameters:
length - length of the result
Returns:
result of a PRF with variable length