Class SymmetricKey

    • Constructor Detail

      • SymmetricKey

        public SymmetricKey()
        Creates a SymmetricKey with a random key identifier and a random key with DefaultKeySize bits.
      • SymmetricKey

        public SymmetricKey​(String kid)
        Creates a SymmetricKey with the specified key identifier and a random key with DefaultKeySize bits.
        Parameters:
        kid - The key identifier to use.
      • SymmetricKey

        public SymmetricKey​(String kid,
                            int keySizeInBytes)
        Creates a SymmetricKey with the specified key identifier and a random key with the specified size.
        Parameters:
        kid - The key identifier to use.
        keySizeInBytes - The key size to use in bytes.
      • SymmetricKey

        public SymmetricKey​(String kid,
                            int keySizeInBytes,
                            Provider provider)
        Creates a SymmetricKey with the specified key identifier and a random key with the specified size that uses the specified provider.
        Parameters:
        kid - The key identifier to use.
        keySizeInBytes - The key size to use in bytes.
        provider - The provider to use (optional, null for default)
      • SymmetricKey

        public SymmetricKey​(String kid,
                            byte[] keyBytes)
        Creates a SymmetricKey with the specified key identifier and key material.
        Parameters:
        kid - The key identifier to use.
        keyBytes - The key material to use.
      • SymmetricKey

        public SymmetricKey​(String kid,
                            byte[] keyBytes,
                            Provider provider)
        Creates a SymmetricKey with the specified key identifier and key material that uses the specified Provider.
        Parameters:
        kid - The key identifier to use.
        keyBytes - The key material to use.
        provider - The Provider to use (optional, null for default)