@Test public void success_DecodePoint_15() throws DecodeException { EncodedPoint encodedPoint = new EncodedPointEd25519(HexEncoder.getBytes("03cd98b81ef433956b7e2b239910450605959361e6391ebb770149693b6895c8")); Point point = encodedPoint.decode(); assertThat(point.getX().getInteger(), is(new BigInteger("26579811288929527007271986534949559889238357380924397736032152196006905219455"))); assertThat(point.getY().getInteger(), is(new BigInteger("32830504693991902250379781095167938240398939587214709772415373618962111188227"))); }
@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();  }