我已经使用 python 实现了加密 capicom。如何用java设置算法密钥长度、名称和秘密?
def encrypt(key,content):
EncryptedData = win32com.client.Dispatch('CAPICOM.EncryptedData')
EncryptedData.Algorithm.KeyLength = 0
EncryptedData.Algorithm.Name = 4
EncryptedData.SetSecret(key)
EncryptedData.Content = content
return EncryptedData.Encrypt()