Exemple #1
0
        public IJwsSigner Get(IDictionary <string, object> extParams = null)
        {
            var signer = new Rs256Signer();

            ExtUtil.ResolveParams(EXT_PARAMS, extParams, signer.Params);
            signer.Init();
            return(signer);
        }
Exemple #2
0
        public static Rs256Signer Load(Stream stream)
        {
            SignerState state;

            using (var sr = new StreamReader(stream))
            {
                state = JsonSerializer.Deserialize <SignerState>(sr.ReadToEnd());
            }

            var signer = new Rs256Signer(state.Params);

            signer.Init();
            signer._rsa.ImportParameters(state.RsaParameters);

            return(signer);
        }