你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
IKey 接口
public interface IKey
用于使用 Microsoft Azure 密钥保管库 库表示加密密钥的接口。
方法摘要
修饰符和类型 | 方法和描述 |
---|---|
ListenableFuture<byte[]> |
decryptAsync(final byte[] ciphertext, final byte[] iv, final byte[] authenticationData, final byte[] authenticationTag, final String algorithm)
解密指定的密码文本。 请注意,并非所有算法都需要或支持所有参数。 |
ListenableFuture<Triple<byte[], byte[], String>> |
encryptAsync(final byte[] plaintext, final byte[] iv, final byte[] authenticationData, final String algorithm)
加密指定的纯文本。 请注意,并非所有算法都需要或支持所有参数。 |
String |
getDefaultEncryptionAlgorithm()
此密钥的默认加密算法,使用 Json Web 密钥算法中的表示形式,RFC7513。 |
String |
getDefaultKeyWrapAlgorithm()
此密钥的默认密钥换行算法,使用 Json Web 密钥算法中的表示形式,RFC7513。 |
String |
getDefaultSignatureAlgorithm()
此密钥的默认签名算法,使用 Json Web 密钥算法中的表示形式,RFC7513。 |
String |
getKid()
此密钥的唯一密钥标识符。 |
ListenableFuture<Pair<byte[], String>> |
signAsync(final byte[] digest, final String algorithm)
使用指定的算法对指定的摘要进行签名,如果未指定算法,则为键 DefaultSignatureAlgorithm 签名。 |
ListenableFuture<byte[]> |
unwrapKeyAsync(final byte[] encryptedKey, final String algorithm)
解包 (解密) 指定的加密密钥材料。 |
ListenableFuture<Boolean> |
verifyAsync(final byte[] digest, final byte[] signature, final String algorithm)
使用提供的摘要和算法验证提供的签名值。 |
ListenableFuture<Pair<byte[], String>> |
wrapKeyAsync(final byte[] key, final String algorithm)
包装 (使用指定的算法) 指定的对称密钥材料进行加密,如果未指定,则包装默认密钥WrapAlgorithm。 |
方法详细信息
decryptAsync
public ListenableFuture
解密指定的密码文本。 请注意,并非所有算法都需要或支持所有参数。
参数:
返回:
引发:
encryptAsync
public ListenableFuture
加密指定的纯文本。 请注意,并非所有算法都需要或支持所有参数。
参数:
返回:
引发:
getDefaultEncryptionAlgorithm
public String getDefaultEncryptionAlgorithm()
此密钥的默认加密算法,使用 Json Web 密钥算法中的表示形式,RFC7513。
返回:
getDefaultKeyWrapAlgorithm
public String getDefaultKeyWrapAlgorithm()
此密钥的默认密钥换行算法,使用 Json Web 密钥算法中的表示形式,RFC7513。
返回:
getDefaultSignatureAlgorithm
public String getDefaultSignatureAlgorithm()
此密钥的默认签名算法,使用 Json Web 密钥算法中的表示形式,RFC7513。
返回:
getKid
public String getKid()
此密钥的唯一密钥标识符。
返回:
signAsync
public ListenableFuture
使用指定的算法对指定的摘要进行签名,如果未指定算法,则为键 DefaultSignatureAlgorithm 签名。
参数:
返回:
引发:
unwrapKeyAsync
public ListenableFuture
解包 (解密) 指定的加密密钥材料。
参数:
返回:
引发:
verifyAsync
public ListenableFuture
使用提供的摘要和算法验证提供的签名值。
参数:
返回:
引发:
wrapKeyAsync
public ListenableFuture
包装 (使用指定的算法) 指定的对称密钥材料进行加密,如果未指定,则包装默认密钥WrapAlgorithm。
参数:
返回:
引发: