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
-
Fields inherited from interface javax.crypto.SecretKey
serialVersionUID
-
-
Constructor Summary
Constructors Constructor Description HMACKey(byte[] data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlgorithm()
byte[]
getEncoded()
String
getFormat()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
-
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm
in interfaceKey
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncoded
in interfaceKey
-
-