你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

EncryptionUtility Class

  • java.lang.Object
    • system.fabric.EncryptionUtility

public class EncryptionUtility

Utility class to perform encryption and decryption operations.

Method Summary

Modifier and Type Method and Description
char [] decryptText(String textToDecrypt)

Decrypted the encrypted text. The certificate(.pem) file should be present in the /var/lib/sfcerts folder.

String encryptText(char []textToEncrypt, String certPath)

Encrypts the text with the given certificate file.

String encryptText(char []textToEncrypt, String certPath, String algorithmOid)

Encrypts the text with the given certificate file.

String encryptText(String textToEncrypt, String certPath)

Encrypts the text with the given certificate file.

String encryptText(String textToEncrypt, String certPath, String algorithmOid)

Encrypts the text with the given certificate file.

Method Details

decryptText

public static char [] decryptText(String textToDecrypt)

Decrypted the encrypted text. The certificate(.pem) file should be present in the /var/lib/sfcerts folder.

Parameters:

textToDecrypt - The text to decrypt.

Returns:

The decrypted text as char array.

encryptText

public static String encryptText(char []textToEncrypt, String certPath)

Encrypts the text with the given certificate file.

Parameters:

textToEncrypt - The text to encrypt.
certPath - Path of the certificate(.pem) file to be used for encryption.

Returns:

The encrypted string.

encryptText

public static String encryptText(char []textToEncrypt, String certPath, String algorithmOid)

Encrypts the text with the given certificate file.

Parameters:

textToEncrypt - The text to encrypt.
certPath - Path of the certificate(.pem) file to be used for encryption.
algorithmOid - The encryption algorithm object identifier (OID).

Returns:

The encrypted string.

encryptText

public static String encryptText(String textToEncrypt, String certPath)

Encrypts the text with the given certificate file.

Parameters:

textToEncrypt - The text to encrypt.
certPath - Path of the certificate(.pem) file to be used for encryption.

Returns:

The encrypted string.

encryptText

public static String encryptText(String textToEncrypt, String certPath, String algorithmOid)

Encrypts the text with the given certificate file.

Parameters:

textToEncrypt - The text to encrypt.
certPath - Path of the certificate(.pem) file to be used for encryption.
algorithmOid - The encryption algorithm object identifier (OID).

Returns:

The encrypted string.

Applies to