Package: org.conscrypt

KeySpecUtil

public final class KeySpecUtil
A utility class for working with KeySpecs.

Public Methods

makeRawKeySpec

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