@Test public void success_DecodePoint_12() throws DecodeException { EncodedPoint encodedPoint = new EncodedPointEd25519(HexEncoder.getBytes("17ccd9301c1504aa65aed4872634d7317707fd8e95bbc3b4c4e732be73baf074")); Point point = encodedPoint.decode(); assertThat(point.getX().getInteger(), is(new BigInteger("50505920206304101148506670769962044834562415690945180860800334635063441812972"))); assertThat(point.getY().getInteger(), is(new BigInteger("52893620576450359719018512374896078131701031161676122303582965125535080500247"))); }
@Override public Point decode() throws DecodeException { byte readTarget = value[value.length - 1]; int x0 = ByteUtils.readBit(readTarget, 7); Coordinate y = recoverY(this.value); Coordinate x = recoverX(y, x0); return PointEd25519.fromAffine(x, y); }
EncodedPointEd25519 extends EncodedPoint { @Override public Point decode() throws DecodeException { byte readTarget = value[value.length - 1]; int x0 = ByteUtils.readBit(readTarget, 7); Coordinate y = recoverY(this.value); Coordinate x = recoverX(y, x0); return PointEd25519.fromAffine(x, y); } }
EncodedPointEd25519 extends EncodedPoint { @Override public Point decode() throws DecodeException { byte readTarget = value[value.length - 1]; int x0 = ByteUtils.readBit(readTarget, 7); Coordinate y = recoverY(this.value); Coordinate x = recoverX(y, x0); return PointEd25519.fromAffine(x, y); } EncodedPointEd25519(byte[] value); }
EncodedPointEd25519 extends EncodedPoint { @Override public Point decode() throws DecodeException { byte readTarget = value[value.length - 1]; int x0 = ByteUtils.readBit(readTarget, 7); Coordinate y = recoverY(this.value); Coordinate x = recoverX(y, x0); return PointEd25519.fromAffine(x, y); } EncodedPointEd25519(byte[] value); @Override Point decode(); }
EncodedPointEd25519 extends EncodedPoint { @Override public Point decode() throws DecodeException { byte readTarget = value[value.length - 1]; int x0 = ByteUtils.readBit(readTarget, 7); Coordinate y = recoverY(this.value); Coordinate x = recoverX(y, x0); return PointEd25519.fromAffine(x, y); } EncodedPointEd25519(byte[] value); @Override Point decode();  }