CoordinateEd25519 extends Coordinate { @Override public EncodedCoordinate encode() { byte[] seed = ByteUtils.reverse(ArrayUtils.toByteArray(value, 32)); return new EncodedCoordinateEd25519(seed); } CoordinateEd25519(BigInteger integer); @Override final Coordinate add(Coordinate val); @Override final Coordinate divide(Coordinate val); @Override final Coordinate multiply(Coordinate val); @Override final Coordinate subtract(Coordinate val); @Override final Coordinate mod(); @Override final Coordinate inverse(); @Override Coordinate powerMod(BigInteger exponent); @Override Coordinate negate(); @Override EncodedCoordinate encode(); static final CoordinateEd25519 ONE; }
@Test public void success_Encode_1() { Coordinate coordinate1 = new CoordinateEd25519(new BigInteger("1073164242609237669094038971348660945523306704071742924708751717996060223455")); EncodedCoordinate encoded = coordinate1.encode(); assertThat(HexEncoder.getString(encoded.getValue()), is("df2780568c569c6713ed48bc7d96e04a93fdda45237bfc34afe40518b2635f02")); }
@Test public void success_Encode_2() { Coordinate coordinate1 = new CoordinateEd25519(new BigInteger("4016116405453202388474865418908325977025123430952466464539276325205466974574")); EncodedCoordinate encoded = coordinate1.encode(); assertThat(HexEncoder.getString(encoded.getValue()), is("6e89e4b5973ab73a1538714746c77fd09f33aeeebdf11daffd94d6ba940ae108")); }
@Test public void success_Encode_3() { Coordinate coordinate1 = new CoordinateEd25519(new BigInteger("5635526907038231869349643959556202269054548263441123979990494297630113764337")); EncodedCoordinate encoded = coordinate1.encode(); assertThat(HexEncoder.getString(encoded.getValue()), is("f193d7d58eb5ba3482c54b4dad4f9685726b2957cdf363fd4c6ed5a85e98750c")); }
@Test public void success_Encode_4() { Coordinate coordinate1 = new CoordinateEd25519(new BigInteger("466061824698566712370651010976869652622695944005000025458774533499639142642")); EncodedCoordinate encoded = coordinate1.encode(); assertThat(HexEncoder.getString(encoded.getValue()), is("f29829ffdb3b229fd05dc7f83c1de7ab041cbbeb4156d7442f3e23de19c80701")); }
@Test public void success_Encode_5() { Coordinate coordinate1 = new CoordinateEd25519(new BigInteger("690082385501664621091624779109445751481919948714921317484605800924977635702")); EncodedCoordinate encoded = coordinate1.encode(); assertThat(HexEncoder.getString(encoded.getValue()), is("762115b81aae8ab7a87e5d205ee64173ffc2666721b9bed118c4af49a2928601")); }