예제 #1
0
        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))
                       ));
        }
예제 #2
0
        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)));
        }