From a computer science perspective, how is DNA compared for various purposes?
From a computer science perspective, there's nothing at all special about DNA. It's stored as a simple ASCII text file consisting of repetitions of 4-15 different letters. 

DNA, the molecule, is a long chain of nearly identical smaller molecules (nucleotides) joined together. The nucleotides differ only in which of four possible bases (A,C,T/U or G) they have attached. Therefore, when representing a DNA sequence, we only need to represent the bases.
There are also the so-called "ambiguity codes" which represent different possibilities:

IUPAC Code   Meaning             
  A            A                   
  C            C                   
  G            G                   
  T/U          T                   
  M            A or C              
  R            A or G              
  W            A or T              
  S            C or G              
  Y            C or T              
  K            G or T              
  V            A or C or G         
  H            A or C or T         
  D            A or G or T         
  B            C or G or T         
  N            G or A or T or C    


The vast majority of sequences, however, won't use the ambiguity codes and will only have A,C,T,G and the occasional N. 

The most common DNA sequence format is FASTA, which consists of one or more sequences each of which has a header (lines beginning with a &gt;) and 60-character long sequences. This, for example, is an excerpt of human chromosome 17:

&gt;chr17
AAGCTTCTCACCCTGTTCCTGCATAGATAATTGCATGACAATTGCCTTGT
CCCTGCTGAATGTGCTCTGGGGTCTCTGGGGTCTCACCCACGACCAACTC
CCTGGGCCTGGCACCAGGGAGCTTAACAAACATCTGTCCAGCGAATACCT
GCATCCCTAGAAGTGAAGCCACCGCCCAAAGACACGCCCATGTCCAGCTT
AACCTGCATCCCTAGAAGTGAAGGCACCGCCCAAAGACACGCCCATGTCC
AGCTTATTCTGCCCAGTTCCTCTCCAGAAAGGCTGCATGGTTGACACACA
GTGcctgcgacaaagctgaatgctatcatttaaaaactccttgctggttt
gagaggcagaaaatgatatctcatagttgctttactttgcatattttAAA
ATTGTGACTTTCATGGCATAAATAATACTGGTTTATTACAGAAGCACTAG
AAAATGCATGTGGACAAAAGTTGGGATTAGGAGagagaaatgaagacata


So, in conclusion, there's nothing special about DNA. If you're writing software that compares DNA sequences, you are writing software that compares ASCII text. You can hash it, salt it and anything else you might want to do. 

The only thing you should be aware of is that minor variations are very rarely meaningful. The level of identity you will need will depend on the precise biological question being asked but as a general rule, a single nucleotide difference is as likely to be a sequencing error as a real difference. You will need to collaborate with biologists in order to set up the right threshold for whatever your project is looking at.