Month: July 2010

怎样理解执行计划?

待完善… The output may look like,    Operation | Options | Object Name | Cost | Cardinality | Bytes Operation, Options: 数据库在这一步采取的操作及其使用的参数. 请参考 所有操作的集合 Object Name: Name of the table or index. Cost:  a function of the CPU_COST and IO_COST. 它是无量纲的,仅用于各步操作的代价比较 Cardinality: the number of rows accessed by the operation Bytes:   the number of bytes …

怎样理解执行计划? Read More »

Network Security Essentials — Notes4. Public-key Cryptography

1. Public-key Cryptography    The schem uses two keys, if one is for encryption, then the other is for decryption.    "Truly revolutionary advance in cryptography"    "Profound concequences in the areas of Confidentiality, key distrituion and Message Authentication" 2.Six Integriends   a.Plaintext   b.Encryption Algorithm (Not Secret)   c.Public Key (Not Secret)   d.Private …

Network Security Essentials — Notes4. Public-key Cryptography Read More »

Network Security Essentials — Notes3. Message Authentication

1. Message Authentication   a. Msg is not altered   b. Msg is indeed from the alleged sender   c. Msg is has not been artifically delayed or replayed 2.Two Techniques of Authentication    a. Encrypt the whole message before sending         Msg is authentic <=> encrypted msg can be successfully decrypted      Reversable Encryption/Decryption …

Network Security Essentials — Notes3. Message Authentication Read More »

Network Security Essentials — Notes2. Symmetric Ciphers

1. Overview   Symmetric Ciphers use the same key for both decryption and encryption.   Other terms for symmetric-key encryption are secret-key, single-key, shared-key,  one-key, and private-key encryption. 2. 5 Indredients   a.Plaintext   b.Encryption Algorithm   c.Secret Key   e.Ciphertest   f.Decryption Algorithm Algorithms are not kept secret, but keys are 3.Two kinds of …

Network Security Essentials — Notes2. Symmetric Ciphers Read More »

Network Security Essentials — Notes1. Introduction

‘Network Security Essentials: Applications and Standards’, by Dr. William Stallings There is a systematic way of defining security requirements — X.800 Security Architecture for OSI 1. The architecture defines,   a. Attack   b. Service  — detecting and preventing Attacks   c. Mechanism — implements Service 2. Attack    a.Passive Attack       i. Release of …

Network Security Essentials — Notes1. Introduction Read More »

什么情况下应该将IOException包装成RuntimeException抛出,什么情况下不应该?

如果某个方法自己负责 流的打开/关闭,那这个方法就可以把IOException包装成RuntimeException再抛出 如果某个方法不负责流的打开和关闭,那它就应该把IOException如实抛出,上层的某个方法再根据这个IOException来关闭流 如果某个方法只不打开流,却要负责流的关闭,那这种写法本身就错了…… 谁打开,谁关闭,是处理IO流的一个准则。

关于网络安全, William Stallings 有两本书

一本是久负盛名的 ‘Cryptography and Network Security’ 另一本是 ‘Network Security Essentials: Applications and Standards’ 据作者的说法,第二本是从第一本中 "Adapt" 而来。 两本书的区别在于第一本有大量的篇幅放在密码学的数学原理上,而第二本则没有。 我们是程序员,不是算法专业研究生,所以第二本更适合我们。