How to base64 encode a SHA-1 hash in Scala and Play Framework?
Faster and cleaner with Play api :
var signature = play.api.libs.Codecs.sha1(md.digest("Foo".getBytes))
Play 2.7 (possible also older versions)
var signature = play.api.libs.Codecs.sha1("Foo")
You seem to have forgotten a pair of parenthesis:
val md = java.security.MessageDigest.getInstance("SHA-1")
val ha = new sun.misc.BASE64Encoder().encode(md.digest(params.get("Foo").getBytes))
That should work better.