net.sourceforge.plantuml.eggs.SentenceProducer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.eggs;
import static java.nio.charset.StandardCharsets.UTF_8;
public class SentenceProducer {
// ::remove file when __CORE__
private final String secret;
public SentenceProducer(String sentence1, String sentence2) {
final byte[] key = EggUtils.fromSecretSentence(sentence1).toByteArray();
final byte[] sen2 = sentence2.getBytes(UTF_8);
final byte[] crypted = EggUtils.xor(sen2, key);
this.secret = EggUtils.fromByteArrays(crypted);
}
public String getSecret() {
return secret;
}
}