I want dns server to convert into sha1 url requests of users and to restrict for some domains looking at its table. is there a way to do this with bind or djbdns or another dns server?
Do you mean the dns serer shall hash its zone names e.g. with sha1 so that anybody reading the db directly won't know whicht zone it is?! If so I don't think this can work, as a hash function can not be reverted, thus a reverse lookup should not be possible. Besides this I personall do not see a real benefit from security perspective as except with google / shodan etc. you won't just dump all zones of a dns server except you allow zone transfers for anybody. For users having local access you can eitther prevent looking to those files or you do it the classical way of securing thinks by segregation of duties and set up a dedicated dns server...