Class CryptoTink

java.lang.Object
sk.iway.iwcm.components.crypto.CryptoTink
All Implemented Interfaces:
Crypto

public class CryptoTink extends Object implements Crypto
CryptoTink je verzia sifrovania s vyuzitim kniznice google tink - https://github.com/google/tink Pouziva sa hybridne sifrovanie pre podporu dlhych dat Title webjet8 Company Interway a.s. (www.interway.sk) Copyright Interway a.s. (c) 2001-2019
  • Field Details

    • ALG_KEY

      public static String ALG_KEY
  • Method Details

    • getInstance

      public static CryptoTink getInstance()
    • generateNewPrivateAndPublicKey

      public CryptoKeys generateNewPrivateAndPublicKey(String login)
      Specified by:
      generateNewPrivateAndPublicKey in interface Crypto
    • encrypt

      public String encrypt(String plainData, String publicKey) throws Exception
      Specified by:
      encrypt in interface Crypto
      Throws:
      Exception
    • decrypt

      public String decrypt(String encryptedData, String privateKey) throws Exception
      Specified by:
      decrypt in interface Crypto
      Throws:
      Exception
    • getAlgKey

      public String getAlgKey()
      Specified by:
      getAlgKey in interface Crypto
    • generateNewPrivateAndPublicKey2

      protected com.google.crypto.tink.KeysetHandle generateNewPrivateAndPublicKey2()
    • loadPublicKeyBase64

      protected com.google.crypto.tink.KeysetHandle loadPublicKeyBase64(String publicKey)
    • loadPrivateKeyBase64

      protected com.google.crypto.tink.KeysetHandle loadPrivateKeyBase64(String privateKey)
    • getKeyBase64

      protected String getKeyBase64(com.google.crypto.tink.KeysetHandle keysetHandle)
    • getPublicKeyFromPrivateKeyBase64

      public String getPublicKeyFromPrivateKeyBase64(com.google.crypto.tink.KeysetHandle keysetHandle)
    • getPrivateKeyBase64

      protected String getPrivateKeyBase64(com.google.crypto.tink.KeysetHandle keysetHandle)
    • getContextInfo

      protected String getContextInfo()