Class KeyUtils


  • public class KeyUtils
    extends java.lang.Object
    JCA key utilities.
    Version:
    2022-09-24
    Author:
    Vladimir Dzhuvinov
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.crypto.SecretKey toAESKey​(javax.crypto.SecretKey secretKey)
      Returns the specified secret key as a wrapped secret key with its algorithm set to "AES".
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toAESKey

        public static javax.crypto.SecretKey toAESKey​(javax.crypto.SecretKey secretKey)
        Returns the specified secret key as a wrapped secret key with its algorithm set to "AES". If the input key algorithm is "AES" it is returned unmodified.
        Parameters:
        secretKey - The secret key, null if not specified.
        Returns:
        The AES secret key, null if not specified.