Package dev.lavalink.youtube.cipher
Class SignatureCipher
java.lang.Object
dev.lavalink.youtube.cipher.SignatureCipher
Describes one signature cipher
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSignatureCipher(@NotNull String nFunction, @NotNull String timestamp, @NotNull String rawScript) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOperation(@NotNull CipherOperation operation) booleanisEmpty()transform(@NotNull String text, @NotNull ScriptEngine scriptEngine)
-
Field Details
-
nFunction
-
scriptTimestamp
-
rawScript
-
-
Constructor Details
-
SignatureCipher
-
-
Method Details
-
apply
- Parameters:
text- Text to apply the cipher on- Returns:
- The result of the cipher on the input text
-
transform
public String transform(@NotNull @NotNull String text, @NotNull @NotNull ScriptEngine scriptEngine) throws ScriptException, NoSuchMethodException - Parameters:
text- Text to transformscriptEngine- JavaScript engine to execute function- Returns:
- The result of the n parameter transformation
- Throws:
ScriptExceptionNoSuchMethodException
-
addOperation
- Parameters:
operation- The operation to add to this cipher
-
isEmpty
public boolean isEmpty()- Returns:
- True if the cipher contains no operations.
-