RsaKey 类

定义

public class RsaKey implements IKey
继承
java.lang.Object
Closeable
RsaKey

构造函数

RsaKey(String kid)
RsaKey(String kid, int keySize)
RsaKey(String kid, int keySize, Provider provider)
RsaKey(String kid, KeyPair keyPair)
RsaKey(String kid, KeyPair keyPair, Provider provider)

字段

KeySize1024
KeySize2048

方法

close()
decryptAsync(final byte[] ciphertext, final byte[] iv, final byte[] authenticationData, final byte[] authenticationTag, final String algorithm)

Decrypts the specified cipher text. Note that not all algorithms require, or support, all parameters.

encryptAsync(final byte[] plaintext, final byte[] iv, final byte[] authenticationData, final String algorithm)

Encrypts the specified plain text. Note that not all algorithms require, or support, all parameters.

getDefaultEncryptionAlgorithm()

The default encryption algorithm for this key, using the representations from Json Web Key Algorithms, RFC7513.

getDefaultKeySize()
getDefaultKeyWrapAlgorithm()

The default key wrap algorithm for this key, using the representations from Json Web Key Algorithms, RFC7513.

getDefaultSignatureAlgorithm()

The default signature algorithm for this key, using the representations from Json Web Key Algorithms, RFC7513.

getKid()

The unique key identifier for this key.

signAsync(final byte[] digest, final String algorithm)

Signs the specified digest using the specified algorithm, or the keys DefaultSignatureAlgorithm if no algorithm is specified.

unwrapKeyAsync(final byte[] encryptedKey, final String algorithm)

Unwraps (decrypts) the specified encryped key material.

verifyAsync(final byte[] digest, final byte[] signature, final String algorithm)

Verifies the supplied signature value using the supplied digest and algorithm.

wrapKeyAsync(final byte[] key, final String algorithm)

Wraps (encrypts) the specified symmetric key material using the specified algorithm, or the keys DefaultKeyWrapAlgorithm if none is specified.

适用于