Class AesEncryptor

java.lang.Object
ru.bgcrm.util.crypto.AesEncryptor
All Implemented Interfaces:
ru.bgcrm.util.crypto.Encryptor

public class AesEncryptor extends Object implements ru.bgcrm.util.crypto.Encryptor
  • Constructor Details

    • AesEncryptor

      public AesEncryptor(byte[] key)
      Parameters:
      key - 16 bytes only
  • Method Details

    • encrypt

      @NotNull public @NotNull String encrypt(@NotNull @NotNull String password) throws BGException
      Specified by:
      encrypt in interface ru.bgcrm.util.crypto.Encryptor
      Throws:
      BGException
    • decrypt

      @NotNull public @NotNull String decrypt(@NotNull @NotNull String vectorAndPassword) throws BGException
      Specified by:
      decrypt in interface ru.bgcrm.util.crypto.Encryptor
      Throws:
      BGException