Package java.security
Class KeyStore.SecretKeyEntry
- java.lang.Object
-
- java.security.KeyStore.SecretKeyEntry
-
- All Implemented Interfaces:
KeyStore.Entry
- Enclosing class:
- KeyStore
public static final class KeyStore.SecretKeyEntry extends Object implements KeyStore.Entry
SecretKeyEntryrepresents aKeyStoreentry that holds a secret key.
-
-
Constructor Summary
Constructors Constructor Description SecretKeyEntry(SecretKey secretKey)Constructs a new instance ofSecretKeyEntrywith the givenSecretKey.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecretKeygetSecretKey()Returns the secret key.StringtoString()Returns a string containing a concise, human-readable description of thisSecretKeyEntry.
-
-
-
Constructor Detail
-
SecretKeyEntry
public SecretKeyEntry(SecretKey secretKey)
Constructs a new instance ofSecretKeyEntrywith the givenSecretKey.- Parameters:
secretKey- the secret key.- Throws:
NullPointerException- ifsecretKeyisnull.
-
-
Method Detail
-
getSecretKey
public SecretKey getSecretKey()
Returns the secret key.- Returns:
- the secret key.
-
-