public void Init() { var crypto = new BouncyCastleCrypto(); _rsaPrivate = crypto.LoadRsaPrivateKey(File.ReadAllText("test-private.key")); _rsaPublic = crypto.LoadRsaPublicKey(File.ReadAllText("test-public.key")); _jwe = new JweService(_rsaPrivate); }
public void Initialize() { _crypto = new BouncyCastleCrypto(); _privateKey = _crypto.LoadRsaPrivateKey(File.ReadAllText("test-private.key")); _privateKeyPublicKey = _crypto.LoadRsaPublicKey(File.ReadAllText("test-public.key")); _publicKey = _crypto.LoadRsaPublicKey(PUBLIC_KEY_PEM); _publicKeyOther = _crypto.LoadRsaPublicKey(PUBLIC_KEY_OTHER); _keyList = new Dictionary <string, RSA>(); _keyList.Add("main", _privateKey); _jwtService = new JwtService(new UnixTimeConverter(), "lka", _keyList, "main", 5); }