@Test public void success_DecodePoint_20() throws DecodeException { EncodedPoint encodedPoint = new EncodedPointEd25519(HexEncoder.getBytes("1c8dc594082e7ddad6a97f500247a585993d3b1a797041ce6f203902a7816833")); Point point = encodedPoint.decode(); assertThat(point.getX().getInteger(), is(new BigInteger("43891533794047446595129048335950223439754428083113210033800244870979949519638"))); assertThat(point.getY().getInteger(), is(new BigInteger("23252602200307492321313643524776623321052079804243872788483132543098216090908"))); }
@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();  }