Interface TextCipher

All Known Implementing Classes:
TextCipher.IdentityTextCipher

public interface TextCipher

可逆文字保護邊界。

消費端只取得特定 purpose 的實例,不接觸持久化加密根金鑰。null 代表欄位缺值,實作須原樣 保留;非 null 文字(包含空字串)則依實作進行加解密。

  • Method Details

    • encrypt

      String encrypt(String plaintext)
    • decrypt

      String decrypt(String ciphertext)
    • identity

      static TextCipher identity()
      不改變內容的實作,供不需要持久化加密的相容組裝使用。