@Test public void testVector09() { final PointHasher pointHasher = EcCurve.secp256r1.getPointHasher(); EcPoint result = pointHasher.hashToCurve("これはテストです。 - 000"); System.out.println("Test Vector Point: " + result); EcPoint expected = new EcPoint("8160756293490157937104077009852267937992106172572270634375298423831985947063", "104553581667911433399913073322205673437677128806540598101562998497852216837154"); Assert.assertEquals(expected, result); }
public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); }
PointHasher { public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); } }
PointHasher { public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); } PointHasher(EcCurve curve); }
PointHasher { public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); } PointHasher(EcCurve curve); BigInteger squareRoot(BigInteger a); EcPoint hashToCurve(final String input); EcPoint hashToCurve(final String input, final byte[] clientSecret); EcPoint hashToCurve(final byte[] input); EcPoint hashToCurve(final byte[] input, final byte[] clientSecret); abstract EcPoint createPointFromInteger(BigInteger t); }
PointHasher { public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); } PointHasher(EcCurve curve); BigInteger squareRoot(BigInteger a); EcPoint hashToCurve(final String input); EcPoint hashToCurve(final String input, final byte[] clientSecret); EcPoint hashToCurve(final byte[] input); EcPoint hashToCurve(final byte[] input, final byte[] clientSecret); abstract EcPoint createPointFromInteger(BigInteger t); static final BigInteger TWO; static final BigInteger THREE; static final BigInteger FOUR; }