AliyunKms.AsymmetricSignResult, AliyunKms.AsymmetricVerifyResult, AliyunKms.BaseResult, AliyunKms.CreateSecretResult, AliyunKms.DecryptDataKeyResult, AliyunKms.GenerateDataKeyResult, AliyunKms.GetSecretValueResult| Constructor and Description |
|---|
DefaultAliyunKms(AliyunConfig config) |
public DefaultAliyunKms(AliyunConfig config)
public AliyunKms.GenerateDataKeyResult generateDataKey(CmkId keyId, CryptoAlgorithm algorithm, Map<String,String> context)
AliyunKmsgenerateDataKey in interface AliyunKmskeyId - keyIdalgorithm - 算法信息context - dataKey密钥上下文信息,后续解密对应的dataKey需要相同的上下文信息public AliyunKms.DecryptDataKeyResult decryptDataKey(EncryptedDataKey encryptedDataKey, Map<String,String> context)
AliyunKmsdecryptDataKey in interface AliyunKmsencryptedDataKey - 数据密钥密文context - dataKey密钥上下文信息public EncryptedDataKey encryptDataKey(CmkId keyId, String plaintext, Map<String,String> context)
AliyunKmsencryptDataKey in interface AliyunKmskeyId - keyIdplaintext - 数据密钥明文(Base64编码)public EncryptedDataKey reEncryptDataKey(CmkId keyId, EncryptedDataKey encryptedDataKey, Map<String,String> context)
AliyunKmsreEncryptDataKey in interface AliyunKmskeyId - 待加密的keyIdencryptedDataKey - 数据密钥密文context - dataKey密钥上下文信息public AliyunKms.AsymmetricSignResult asymmetricSign(CmkId keyId, String keyVersionId, SignatureAlgorithm algorithm, byte[] digest)
AliyunKmsasymmetricSign in interface AliyunKmskeyId - keyIdkeyVersionId - keyId对应主密钥的版本algorithm - 非对称算法digest - 签名信息public AliyunKms.AsymmetricVerifyResult asymmetricVerify(CmkId keyId, String keyVersionId, SignatureAlgorithm algorithm, byte[] digest, byte[] signature)
AliyunKmsasymmetricVerify in interface AliyunKmskeyId - keyIdkeyVersionId - keyId对应主密钥的版本algorithm - 非对称算法digest - 使用Algorithm中对应的哈希算法,对原始message生成的摘要signature - 待验证的签名结果public AliyunKms.CreateSecretResult createSecret(CmkId keyId, String secretName, String versionId, String secretData, String secretDataType)
AliyunKmscreateSecret in interface AliyunKmskeyId - keyIdsecretName - 凭据名称versionId - 凭据初始版本secretData - 凭据值secretDataType - 凭据值的类型public AliyunKms.GetSecretValueResult getSecretValue(CmkId keyId, String secretName)
AliyunKmsgetSecretValue in interface AliyunKmskeyId - keyIdsecretName - 凭据名称public AliyunKms.GetSecretValueResult getSecretValue(CmkId keyId, String secretName, String versionId)
getSecretValue in interface AliyunKmsCopyright © 2020. All rights reserved.