procedure encipher(plain_txt, plain_alpha,
      cipher_alpha1, cipher_alpha2)
         local keys, values, digraphs, cipher_txt

   keys := create !plain_alpha || !plain_alpha
   values := create !cipher_alpha1 || !cipher_alpha2

   digraphs := table()

   while digraphs[@keys] := @values

   cipher_txt := ""

   plain_txt ? {
      while cipher_txt ||:= digraphs[move(2)]
      }

   return cipher_txt

end