mirror of https://github.com/sbt/sbt.git
additional entry point in Hash
This commit is contained in:
parent
6108808aeb
commit
9858c9b91d
|
|
@ -33,7 +33,9 @@ object Hash
|
|||
array
|
||||
}
|
||||
/** Calculates the SHA-1 hash of the given String.*/
|
||||
def apply(s: String): Array[Byte] = apply(new ByteArrayInputStream(s.getBytes("UTF-8")))
|
||||
def apply(s: String): Array[Byte] = apply(s.getBytes("UTF-8"))
|
||||
/** Calculates the SHA-1 hash of the given Array[Byte].*/
|
||||
def apply(as: Array[Byte]): Array[Byte] = apply(new ByteArrayInputStream(as))
|
||||
/** Calculates the SHA-1 hash of the given file.*/
|
||||
def apply(file: File): Array[Byte] = Using.fileInputStream(file)(apply)
|
||||
/** Calculates the SHA-1 hash of the given stream, closing it when finished.*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue