Top Fields Constructors Methods
org.keycloak.common.util

public Class KeyUtils

extends Object
Class Inheritance
Imports
java.security.Key, .KeyFactory, .KeyPair, .KeyPairGenerator, .MessageDigest, .NoSuchAlgorithmException, .PrivateKey, .PublicKey, java.security.interfaces.RSAPrivateCrtKey, java.security.spec.RSAPublicKeySpec, javax.crypto.SecretKey, javax.crypto.spec.SecretKeySpec, org.keycloak.common.crypto.CryptoIntegration

Author
Stian Thorgersen

Field Summary

Modifier and TypeField and Description
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String
public static PublicKey
public static KeyPair
generateRsaKeyPair(int keysize)

public static SecretKey
loadSecretKey(byte[] secret, String javaAlgorithmName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_MESSAGE_DIGESTback to summary
private static final String DEFAULT_MESSAGE_DIGEST

Constructor Detail

KeyUtilsback to summary
private KeyUtils()

Method Detail

createKeyIdback to summary
public static String createKeyId(Key key)
extractPublicKeyback to summary
public static PublicKey extractPublicKey(PrivateKey key)
generateRsaKeyPairback to summary
public static KeyPair generateRsaKeyPair(int keysize)
loadSecretKeyback to summary
public static SecretKey loadSecretKey(byte[] secret, String javaAlgorithmName)