你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
KeyVaultKey 类
- java.
lang. Object - Closeable
- IKey
- com.
microsoft. azure. keyvault. extensions. KeyVaultKey
- com.
public class KeyVaultKey implements IKey
执行加密操作的密钥保管库密钥。
构造函数摘要
构造函数 | 说明 | |
---|---|---|
KeyVaultKey(KeyVaultClient client, KeyBundle keyBundle) |
方法摘要
修饰符和类型 | 方法和描述 |
---|---|
void | close() |
ListenableFuture<byte[]> |
decryptAsync(byte[] ciphertext, byte[] iv, byte[] authenticationData, byte[] authenticationTag, String algorithm)
解密指定的密码文本。 请注意,并非所有算法都需要或支持所有参数。 |
ListenableFuture<Triple<byte[], byte[], String>> |
encryptAsync(byte[] plaintext, byte[] iv, byte[] authenticationData, String algorithm)
加密指定的纯文本。 请注意,并非所有算法都需要或支持所有参数。 |
String |
getDefaultEncryptionAlgorithm()
此密钥的默认加密算法,使用 Json Web 密钥算法中的表示形式,RFC7513。 |
String |
getDefaultKeyWrapAlgorithm()
此密钥的默认密钥换行算法,使用 Json Web 密钥算法中的表示形式,RFC7513。 |
String |
getDefaultSignatureAlgorithm()
此密钥的默认签名算法,使用 Json Web 密钥算法中的表示形式,RFC7513。 |
String |
getKid()
此密钥的唯一密钥标识符。 |
ListenableFuture<Pair<byte[], String>> |
signAsync(byte[] digest, String algorithm)
使用指定的算法对指定的摘要进行签名,如果未指定算法,则为键 DefaultSignatureAlgorithm 签名。 |
ListenableFuture<byte[]> |
unwrapKeyAsync(byte[] ciphertext, String algorithm)
解包 (解密) 指定的加密密钥材料。 |
ListenableFuture<Boolean> |
verifyAsync(byte[] digest, byte[] signature, String algorithm)
使用提供的摘要和算法验证提供的签名值。 |
ListenableFuture<Pair<byte[], String>> |
wrapKeyAsync(byte[] plaintext, String algorithm)
包装 (使用指定的算法) 指定的对称密钥材料进行加密,如果未指定,则包装默认密钥WrapAlgorithm。 |
构造函数详细信息
KeyVaultKey
protected KeyVaultKey(KeyVaultClient client, KeyBundle keyBundle)
Parameters:
方法详细信息
close
public void close()
decryptAsync
public ListenableFuture
解密指定的密码文本。 请注意,并非所有算法都需要或支持所有参数。
Overrides:
KeyVaultKey.decryptAsync(byte[] ciphertext, byte[] iv, byte[] authenticationData, byte[] authenticationTag, String algorithm)Parameters:
Returns:
Throws:
encryptAsync
public ListenableFuture<>
加密指定的纯文本。 请注意,并非所有算法都需要或支持所有参数。
Overrides:
KeyVaultKey.encryptAsync(byte[] plaintext, byte[] iv, byte[] authenticationData, String algorithm)Parameters:
Returns:
Throws:
getDefaultEncryptionAlgorithm
public String getDefaultEncryptionAlgorithm()
此密钥的默认加密算法,使用 Json Web 密钥算法中的表示形式,RFC7513。
Overrides:
KeyVaultKey.getDefaultEncryptionAlgorithm()Returns:
getDefaultKeyWrapAlgorithm
public String getDefaultKeyWrapAlgorithm()
此密钥的默认密钥换行算法,使用 Json Web 密钥算法中的表示形式,RFC7513。
Overrides:
KeyVaultKey.getDefaultKeyWrapAlgorithm()Returns:
getDefaultSignatureAlgorithm
public String getDefaultSignatureAlgorithm()
此密钥的默认签名算法,使用 Json Web 密钥算法中的表示形式,RFC7513。
Overrides:
KeyVaultKey.getDefaultSignatureAlgorithm()Returns:
getKid
public String getKid()
此密钥的唯一密钥标识符。
Overrides:
KeyVaultKey.getKid()Returns:
signAsync
public ListenableFuture<>
使用指定的算法对指定的摘要进行签名,如果未指定算法,则为键 DefaultSignatureAlgorithm 签名。
Overrides:
KeyVaultKey.signAsync(byte[] digest, String algorithm)Parameters:
Returns:
Throws:
unwrapKeyAsync
public ListenableFuture
解包 (解密) 指定的加密密钥材料。
Overrides:
KeyVaultKey.unwrapKeyAsync(byte[] ciphertext, String algorithm)Parameters:
Returns:
Throws:
verifyAsync
public ListenableFuture
使用提供的摘要和算法验证提供的签名值。
Overrides:
KeyVaultKey.verifyAsync(byte[] digest, byte[] signature, String algorithm)Parameters:
Returns:
Throws:
wrapKeyAsync
public ListenableFuture<>
包装 (使用指定的算法) 指定的对称密钥材料进行加密,如果未指定,则包装默认密钥WrapAlgorithm。
Overrides:
KeyVaultKey.wrapKeyAsync(byte[] plaintext, String algorithm)Parameters:
Returns:
Throws:
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈