private static ECPoint DecodePublicKey(AnonymousTokenKey key) { var curve = CustomNamedCurves.GetByName(key.Crv); return(curve.Curve.CreatePoint( new BigInteger(Convert.FromBase64String(key.X)), new BigInteger(Convert.FromBase64String(key.Y)) )); }
private static ECPublicKeyParameters DecodePublicKey(AnonymousTokenKey key) { var curve = CustomNamedCurves.GetByName(key.Crv); var clientSidePublicKeyPoint = curve.Curve.CreatePoint( new BigInteger(Convert.FromBase64String(key.X)), new BigInteger(Convert.FromBase64String(key.Y)) ); return(new ECPublicKeyParameters("ECDSA", clientSidePublicKeyPoint, new ECDomainParameters(curve))); }