Package java.security

Class KeyStore.SecretKeyEntry

  • All Implemented Interfaces:
    KeyStore.Entry
    Enclosing class:
    KeyStore

    public static final class KeyStore.SecretKeyEntry
    extends Object
    implements KeyStore.Entry
    SecretKeyEntry represents a KeyStore entry that holds a secret key.
    • Constructor Detail

      • SecretKeyEntry

        public SecretKeyEntry​(SecretKey secretKey)
        Constructs a new instance of SecretKeyEntry with the given SecretKey.
        Parameters:
        secretKey - the secret key.
        Throws:
        NullPointerException - if secretKey is null.
    • Method Detail

      • getSecretKey

        public SecretKey getSecretKey()
        Returns the secret key.
        Returns:
        the secret key.
      • toString

        public String toString()
        Returns a string containing a concise, human-readable description of this SecretKeyEntry.
        Overrides:
        toString in class Object
        Returns:
        a printable representation for this SecretKeyEntry.