au.net.aba.crypto.spec
Class RC5KeySpec
java.lang.Object
|
+--au.net.aba.crypto.spec.RC5KeySpec
- public class RC5KeySpec
- extends java.lang.Object
- implements java.security.spec.KeySpec
A class that provides a specification for a RC5 key, taken
from the RC4 implementation.
|
Constructor Summary |
RC5KeySpec(byte[] key)
An RC5 key has an allowable range from 0..255. |
RC5KeySpec(byte[] key,
int len)
An RC5 key has an allowable range from 0..255. |
RC5KeySpec(byte[] key,
int offset,
int len)
An RC5 key has an allowable range from 0..255. |
|
Method Summary |
byte[] |
getKey()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
RC5KeySpec
public RC5KeySpec(byte[] key)
throws java.security.InvalidKeyException
- An RC5 key has an allowable range from 0..255. We use the
first 16 bytes here.
- Parameters:
key - the bytes making up the key.- Throws:
- java.security.InvalidKeyException - if the key material is too short.
RC5KeySpec
public RC5KeySpec(byte[] key,
int len)
throws java.security.InvalidKeyException
- An RC5 key has an allowable range from 0..255. Uses the first
len bytes to form the RC5 key.
- Parameters:
key - the bytes making up the key.len - the size (in bytes) of the key to use.- Throws:
- java.security.InvalidKeyException - if the key material is too short.
RC5KeySpec
public RC5KeySpec(byte[] key,
int offset,
int len)
throws java.security.InvalidKeyException
- An RC5 key has an allowable range from 0..255. Uses the first
len bytes starting at offset>/tt> to form the RC5 key.
- Parameters:
key - the bytes making up the key.offset - the offset to start copying the key material.len - the size (in bytes) of the key.- Throws:
- java.security.InvalidKeyException - if the key material is too short.
getKey
public byte[] getKey()
- Returns:
- the RC5 key