Skip to content

choffmeister/securestring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

securestring Build Status

An implementation to securely hold a private string in memory implemented in Scala 2.10.3.

Example

val password = Array[Char]('p', 'a', 's', 's')
val securestring = SecureString(password)

// original array is wiped out
println(password.toSeq) // prints 4 times the char '\0'

// access the secret string
// encrypted string is decrypted and passed to the inner funciton
securestring.read { plain =>
  println(plain.mkString) // prints "pass"
}

// after the inner function the decrypted char array is automatically wiped out

Use with SBT

Add the following configuration to your build.sbt:

resolvers += "repo.choffmeister.de" at "http://repo.choffmeister.de/maven2"

libraryDependencies += "de.choffmeister" %% "securestring" % "0.0.1"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages