Package org.conscrypt

Class KeySpecUtil

java.lang.Object
org.conscrypt.KeySpecUtil

public final class KeySpecUtil extends Object
A utility class for working with KeySpecs.
  • Constructor Details

    • KeySpecUtil

      private KeySpecUtil()
  • Method Details

    • makeRawKeySpec

      public static <T extends KeySpec> T makeRawKeySpec(byte[] bytes, Class<T> keySpecClass) throws InvalidKeySpecException
      Creates a KeySpec object for the provided keySpecClass. The KeySpec must be a subclass of EncodedKeySpec and its getFormat() method must return "raw".
      Throws:
      InvalidKeySpecException