/// <summary>constructor</summary>
        /// <param name="esNNN">JWS_ECDSA.ES</param>
        public EccKeyConverter(JWS_ECDSA.ES esNNN)
        {
            this.ESnnn = esNNN;

            switch (this.ESnnn)
            {
            case JWS_ECDSA.ES._256:
                this.JwtConstESnnn      = JwtConst.ES256;
                this._hashAlgorithmName = HashAlgorithmName.SHA256;
                this.HashAlgorithm      = EnumHashAlgorithm.SHA256_M;
                break;

            case JWS_ECDSA.ES._384:
                this.JwtConstESnnn      = JwtConst.ES384;
                this._hashAlgorithmName = HashAlgorithmName.SHA384;
                this.HashAlgorithm      = EnumHashAlgorithm.SHA384_M;
                break;

            case JWS_ECDSA.ES._512:
                this.JwtConstESnnn      = JwtConst.ES512;
                this._hashAlgorithmName = HashAlgorithmName.SHA512;
                this.HashAlgorithm      = EnumHashAlgorithm.SHA512_M;
                break;
            }
        }
示例#2
0
 /// <summary>constructor</summary>
 /// <param name="esNNN">JWS_ECDSA.ES</param>
 public EccPublicKeyConverter(JWS_ECDSA.ES esNNN = JWS_ECDSA.ES._256) : base(esNNN)
 {
 }