@Override public String randomlyEncrypt(String plainText) { do { try { int size = RandomUtil.pickRandomInt(2, 4); return encode( plainText, KeyGeneration.createMatrix(size, 26), KeyGeneration.createMatrix(size, 1, 26)); } catch (MatrixNoInverse noInverse) { } } while (true); }
@Override public String randomlyEncrypt(String plainText) { return encode(plainText, RandomUtil.pickRandomInt(1, 25)); }