Beispiel #1
0
 internal Session(ClientInfo clientInfo,
                  Keychain keychain,
                  AesKey key,
                  RestClient rest,
                  IRestTransport transport)
 {
     ClientInfo = clientInfo;
     Keychain   = keychain;
     Key        = key;
     Rest       = rest;
     Transport  = transport;
 }
 internal static void DecryptAesKey(Encrypted encryptedAesKey, Keychain keychain)
 {
     keychain.Add(AesKey.Parse(Decrypt <R.AesKey>(encryptedAesKey, keychain)));
 }
 public static byte[] CalculateSessionHmacSalt(AesKey sessionKey)
 {
     return(Crypto.HmacSha256(sessionKey.Key, SessionHmacSecret));
 }
Beispiel #4
0
 public MacRequestSigner(AesKey sessionKey, uint seed)
 {
     _sessionId = sessionKey.Id;
     _salt      = Util.CalculateSessionHmacSalt(sessionKey);
     _requestId = seed;
 }
Beispiel #5
0
 public MacRequestSigner(AesKey sessionKey) : this(sessionKey, Crypto.RandomUInt32())
 {
 }
 public void Add(AesKey key)
 {
     _aes[key.Id] = key;
 }