目录

Algorithm

Enum Info

public enum Algorithm

Supported algorithms.

Enum Value Summary

Enum Value and Description

ES256

ES256 algorithm.

ES384

ES384 algorithm.

ES512

ES512 algorithm.

RS256

RS256 algorithm.

RS384

RS384 algorithm.

RS512

RS512 algorithm.

PS256

PS256 algorithm.

PS384

PS384 algorithm.

PS512

PS512 algorithm.

ECDH

ECDH algorithm.

Public Method Summary

Qualifier and Type

Method Name and Description

public boolean

isEccAlgorithm()

Checks whether an ECC algorithm is used.

public boolean

isRsaAlgorithm()

Checks whether an RSA algorithm is used.

public static Algorithm

fromName(String name)

Generates an instance of Algorithm based on the name.

public static Algorithm

fromCode(int code)

Generates an instance of Algorithm based on the integer code.

public int

encodeToInt()

Converts to an integer code.

Public Methods

[h2]isEccAlgorithm

Method

public boolean isEccAlgorithm()

Checks whether an ECC algorithm is used.

Returns

Type

Description

boolean

Whether the current instance of Algorithm is an ECC algorithm.

[h2]isRsaAlgorithm

Method

public boolean isRsaAlgorithm()

Checks whether an RSA algorithm is used.

Returns

Type

Description

boolean

Whether the current instance of Algorithm is an RSA algorithm.

[h2]fromName

Method

public Algorithm fromName(String name)

Generates an instance of Algorithm based on the name.

Parameters

Name

Description

name

Algorithm name.

Returns

Type

Description

Algorithm

Instance of Algorithm.

[h2]fromCode

Method

public Algorithm fromCode(int code)

Generates an instance of Algorithm based on the integer code.

Parameters

Name

Description

code

Algorithm code.

Returns

Type

Description

Algorithm

Instance of Algorithm.

[h2]encodeToInt

Method

public int encodeToInt()

Converts to an integer code.

Returns

Type

Description

int

Integer code.