Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.38 KB | None | 0 0
  1. package com.rr.sinks
  2.  
  3. import scalaz._
  4.  
  5. trait HashModule {
  6.   type Hash
  7.  
  8.   implicit def ShowHash: Show[Hash]
  9.   implicit def EqHash: Equal[Hash]
  10.  
  11.   def computeHash(data: Array[Byte]): Hash
  12.  
  13.   def nameFromHash(hash: Hash): String
  14.   def hashFromName(name: String): Option[Hash]
  15.  
  16.   def serializeHash(hash: Hash): Array[Byte]
  17.  
  18.   def deserializeHash(bytes: Array[Byte]): Hash
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement