psst
Version, currently master branch1 version
- master branchlatestAug 18, 2020
github.com/jwoertink/psst
Encrypt/Decrypt strings
12 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
psst:
github: jwoertink/psst
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.35.1- License
- MIT
- Author
- Jeremy Woertink
Dependencies
This version declares no dependencies.
README
# psst
> psst...c'mere. lemme tell you a secret...
Ever needed to create an encrypted string in your Rails app, and decrypt it in your Lucky app? Yeah, me too. There's lots of solutions for encrypting strings, but they all focus on being within the same app.
Thankfully, both Ruby and Crystal support OpenSSL, but it's a bit confusing to use and figure out. All this library does is use the native OpenSSL with minimal setup so you don't have to go digging around docs in several different places.
## Installation
### Crystal
Add to your shards.yml
```yaml
dependencies:
psst:
github: jwoertink/psst
branch: master
```
In your Crystal
```crystal
require "psst/crystal/src/psst"
Psst.config do |c|
# must be 8 bytes
c.salt = "12345678"
# must be 16 bytes
c.iv = "1234567890abcdef"
c.password = "shhsecret"
end
token = Psst.new.encrypt("secret message")
puts Psst.new.decrypt("iREBySRcG8bc80YZoOpB3Q==")
```
### Ruby
Add to your Gemfile
```ruby
gem 'psst', git: 'https://github.com/jwoertink/psst.git'
```
In your Ruby
```ruby
Psst.config do |c|
# must be 8 bytes
c.salt = "12345678"
# must be 16 bytes
c.iv = "1234567890abcdef"
c.password = "shhsecret"
end
token = Psst.new.encrypt("secret message")
puts Psst.new.decrypt("iREBySRcG8bc80YZoOpB3Q==")
```Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Aug 18, 2020
- Crystal
0.35.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/jwoertink/psst
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 1