Class BytesEncryptor

  • All Implemented Interfaces:
    Encryptor<byte[],​byte[]>

    public class BytesEncryptor
    extends Object
    implements Encryptor<byte[],​byte[]>
    • Method Detail

      • getTransformation

        public String getTransformation()
      • isEncrypted

        public boolean isEncrypted​(byte[] bytes)
        Description copied from interface: Encryptor
        Check whether the given message is already encrypted or not.
        Specified by:
        isEncrypted in interface Encryptor<byte[],​byte[]>
        Parameters:
        bytes - the message to check
        Returns:
        true if encrypted
      • encrypt

        public byte[] encrypt​(byte[] bytes)
        Description copied from interface: Encryptor
        Encrypt the given message.
        Specified by:
        encrypt in interface Encryptor<byte[],​byte[]>
        Parameters:
        bytes - the message to encrypt
        Returns:
        encrypted message
      • decrypt

        public byte[] decrypt​(byte[] bytes)
        Description copied from interface: Encryptor
        Decrypt the given encrypted message.
        Specified by:
        decrypt in interface Encryptor<byte[],​byte[]>
        Parameters:
        bytes - the encrypted message to decrypt
        Returns:
        decrypted message