Package net.i2p.crypto
Class HMAC256Generator.HMACKey
java.lang.Object
net.i2p.crypto.HMAC256Generator.HMACKey
- All Implemented Interfaces:
Serializable
,Key
,SecretKey
,Destroyable
- Enclosing class:
- HMAC256Generator
static final class HMAC256Generator.HMACKey extends Object implements SecretKey
Like SecretKeySpec but doesn't copy the key in the construtor, for speed.
It still returns a copy in getEncoded(), because Mac relies
on that, doesn't work otherwise.
First 32 bytes are returned in getEncoded(), data may be longer.
- Since:
- 0.9.38
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HMACKey(byte[] data)
-
Method Summary
Modifier and Type Method Description String
getAlgorithm()
byte[]
getEncoded()
String
getFormat()
-
Constructor Details
-
HMACKey
public HMACKey(byte[] data)
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithm
in interfaceKey
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncoded
in interfaceKey
-
getFormat
-