Class YoutubeSignatureCipher


  • public class YoutubeSignatureCipher
    extends java.lang.Object
    Describes one signature cipher
    • Constructor Detail

      • YoutubeSignatureCipher

        public YoutubeSignatureCipher()
    • Method Detail

      • apply

        public java.lang.String apply​(java.lang.String text)
        Parameters:
        text - Text to apply the cipher on
        Returns:
        The result of the cipher on the input text
      • transform

        public java.lang.String transform​(java.lang.String text,
                                          javax.script.ScriptEngine scriptEngine)
                                   throws javax.script.ScriptException,
                                          java.lang.NoSuchMethodException
        Parameters:
        text - Text to transform
        scriptEngine - JavaScript engine to execute function
        Returns:
        The result of the n parameter transformation
        Throws:
        javax.script.ScriptException
        java.lang.NoSuchMethodException
      • addOperation

        public void addOperation​(YoutubeCipherOperation operation)
        Parameters:
        operation - The operation to add to this cipher
      • isEmpty

        public boolean isEmpty()
        Returns:
        True if the cipher contains no operations.
      • setNFunction

        public void setNFunction​(java.lang.String nFunction)
        Parameters:
        nFunction - Extracted "n" function
      • setTimestamp

        public void setTimestamp​(java.lang.String timestamp)
        Parameters:
        timestamp - The timestamp in cipher
      • setRawScript

        public void setRawScript​(java.lang.String script)
        Parameters:
        script - Raw script