Interface SocialMediaSteganography

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] decodeCarrier​(MediaType mediaType, byte[] carrier)
      Decodes hidden payload from carrier
      boolean encodeAndPost​(APINames apiNames, java.lang.String keyword, byte[] carrier, byte[] payload, MediaType mediaType)
      Encodes payload in carrier and posts the result to socialMedia
      boolean encodeAndPost​(APINames apiNames, java.lang.String keyword, byte[] carrier, byte[] payload, MediaType mediaType, Token token)
      Loads carrier from file path and uses encodeAndPost
      boolean encodeAndPost​(APINames apiNames, java.lang.String keyword, java.lang.String path, byte[] payload, MediaType mediaType)
      Loads carrier from file path and uses encodeAndPost
      byte[] encodeCarrier​(byte[] carrier, byte[] payload, MediaType mediaType)
      Encodes payload into carrier for a given mediatype
      byte[][] getMediaAndDecode​(java.lang.String keyword, APINames apiNames, MediaType mediaType)
      Gets Media for a certain Keyword and checks if it is a steganographic picture.
      boolean postToSocialMedia​(byte[] carrier, APINames apiNames, java.lang.String keyword, MediaType mediaType)
      Post media to Social Media, if no Token is given set Parameter beforehand e.g.
      boolean postToSocialMedia​(byte[] carrier, APINames apiNames, java.lang.String keyword, MediaType mediaType, Token token)
      Post media to Social Media
      void saveEncodedPicture​(byte[] carrier, byte[] payload, MediaType mediaType, java.lang.String savepath)
      Save encoded Media to given path as a file
      void saveEncodePicture​(java.lang.String filepath, MediaType mediaType, byte[] payload, java.lang.String savepath)
      Load Media from a file and save encoded Media to given path as a file
      void setSeed​(java.lang.Long seed)
      Set the seed for decoding or encoding
      SocialMedia subscribeToSocialMedia​(java.lang.String keyword, APINames apiNames)
      Subscribes a keyword to a social media
    • Method Detail

      • postToSocialMedia

        boolean postToSocialMedia​(byte[] carrier,
                                  APINames apiNames,
                                  java.lang.String keyword,
                                  MediaType mediaType)
        Post media to Social Media, if no Token is given set Parameter beforehand e.g. Tumbler.setApiKey = "..." and Tumbler.setApiSecretKey
        Parameters:
        carrier - data that should be uploaded
        apiNames - API Name
        keyword - The name under which the carrier is posted to social Media
        mediaType - The type of the carrier (e.g. PNG.GIF)
        Returns:
        boolean true when carrier was successfully posted
      • postToSocialMedia

        boolean postToSocialMedia​(byte[] carrier,
                                  APINames apiNames,
                                  java.lang.String keyword,
                                  MediaType mediaType,
                                  Token token)
        Post media to Social Media
        Parameters:
        carrier - data that should be uploaded
        apiNames - API Name
        keyword - The name under which the carrier is posted to social Media
        mediaType - The type of the carrier (e.g. PNG.GIF)
        token - The token used to access Social Media
        Returns:
        boolean true when carrier was successfully posted
      • subscribeToSocialMedia

        SocialMedia subscribeToSocialMedia​(java.lang.String keyword,
                                           APINames apiNames)
        Subscribes a keyword to a social media
        Parameters:
        keyword - The name under which the carrier is posted to social Media
        apiNames - API Name
        Returns:
        Social Media The Social Media Class that can be used for interacting with given API
      • getMediaAndDecode

        byte[][] getMediaAndDecode​(java.lang.String keyword,
                                   APINames apiNames,
                                   MediaType mediaType)
        Gets Media for a certain Keyword and checks if it is a steganographic picture. If it is, proceeds to decode the picture and return payload
        Parameters:
        keyword - keyword under which the media was posted
        apiNames - name of the api used
        mediaType - media type in which the payload is decoded
        Returns:
        payloads all payloads that could be read
      • setSeed

        void setSeed​(java.lang.Long seed)
        Set the seed for decoding or encoding
        Parameters:
        seed - The seed to initialize random function