Files
shiny/examples/02_hash/app.R
2012-06-29 15:53:10 -07:00

17 lines
322 B
R

library(digest)
text <- reactive(function() {
str <- input$input1
if (input$addnewline)
str <- paste(str, "\n", sep='')
return(str)
})
output$md5_hash <- reactive(function() {
digest(text(), algo='md5', serialize=F)
})
output$sha1_hash <- reactive(function() {
digest(text(), algo='sha1', serialize=F)
})