コード例 #1
0
        public KRB_AP_REP(Key key, DateTime timestamp)
        {
            // TODO: timestamp+1
            /// ...
            ///

            this.encrypted = DesEncryption.EncryptObject(timestamp, key);
        }
コード例 #2
0
        public KRB_AS_REP(Key k_a, Key ks_a, Tgt tgt)
        {
            KRB_AS_REP_NoEncrypted noEncrypt = new KRB_AS_REP_NoEncrypted();

            noEncrypt.ks_a = ks_a;
            noEncrypt.tgt  = tgt;

            this.encrypted = DesEncryption.EncryptObject(noEncrypt, k_a);
        }
コード例 #3
0
        public Ticket(Key key, User from, Key shareKeys)
        {
            Ticket_NoEncrypted tne = new Ticket_NoEncrypted();

            tne.from      = from;
            tne.shareKeys = shareKeys;

            this.encrypted = DesEncryption.EncryptObject(tne, key);
        }
コード例 #4
0
        public Tgt(Key k_kdc, User u, Key ks_a)
        {
            TgtNoEncrypted tgtNoEncrypted = new TgtNoEncrypted();

            tgtNoEncrypted.u    = u;
            tgtNoEncrypted.ks_a = ks_a;

            this.encrypted = DesEncryption.EncryptObject(tgtNoEncrypted, k_kdc);
        }
コード例 #5
0
        public KRB_TGS_REP(Key key, User reqUser, Key k_ab, Ticket ticket)
        {
            KRB_TGS_REP_NoEncrypted noEncrypt = new KRB_TGS_REP_NoEncrypted();

            noEncrypt.reqUser = reqUser;
            noEncrypt.k_ab    = k_ab;
            noEncrypt.ticket  = ticket;

            this.encrypted = DesEncryption.EncryptObject(noEncrypt, key);
        }
コード例 #6
0
        public Key GetShareKeys(Key key)
        {
            Ticket_NoEncrypted ticket_noEncrypted = (Ticket_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(ticket_noEncrypted.shareKeys);
        }
コード例 #7
0
        public User GetFrom(Key key)
        {
            Ticket_NoEncrypted ticket_noEncrypted = (Ticket_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(ticket_noEncrypted.from);
        }
コード例 #8
0
        public Authenticator(Key key)
        {
            DateTime now = DateTime.Now;

            this.encrypted = DesEncryption.EncryptObject(now, key);
        }
コード例 #9
0
 public DateTime GetTimestamp(Key key)
 {
     return((DateTime)DesEncryption.DecryptObject(this.encrypted, key));
 }
コード例 #10
0
        public User GetUser(Key key)
        {
            TgtNoEncrypted noEncrypt = (TgtNoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.u);
        }
コード例 #11
0
        public Ticket GetTicket(Key key)
        {
            KRB_TGS_REP_NoEncrypted noEncrypt = (KRB_TGS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.ticket);
        }
コード例 #12
0
        public Key GetK_AB(Key key)
        {
            KRB_TGS_REP_NoEncrypted noEncrypt = (KRB_TGS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.k_ab);
        }
コード例 #13
0
        public User GetReqUser(Key key)
        {
            KRB_TGS_REP_NoEncrypted noEncrypt = (KRB_TGS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.reqUser);
        }
コード例 #14
0
        public Key GetKS_A(Key key)
        {
            KRB_AS_REP_NoEncrypted noEncrypt = (KRB_AS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.ks_a);
        }
コード例 #15
0
        public Key GetKS_A(Key key)
        {
            TgtNoEncrypted noEncrypt = (TgtNoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.ks_a);
        }
コード例 #16
0
        public Tgt GetTGT(Key key)
        {
            KRB_AS_REP_NoEncrypted noEncrypt = (KRB_AS_REP_NoEncrypted)DesEncryption.DecryptObject(this.encrypted, key);

            return(noEncrypt.tgt);
        }
コード例 #17
0
        public DateTime GetTimeStamp(Key key)
        {
            DateTime timestamp = (DateTime)DesEncryption.DecryptObject(this.encrypted, key);

            return(timestamp);
        }