Sha256: ab7ebdedb2e8d36df467d8296f45cad2b0c46ef144d063da3bb462e4b2938e58
Contents?: true
Size: 681 Bytes
Versions: 2
Compression:
Stored size: 681 Bytes
Contents
describe Kumogata::Crypt do it 'encrypt string' do encrypted = Kumogata::Crypt.encrypt("my_password", "jugem jugem") decrypted = Kumogata::Crypt.decrypt("my_password", encrypted) expect(decrypted).to eq("jugem jugem") end it 'encrypt long string' do len = (RUBY_PLATFORM =~ /darwin/) ? 1 : 10 encrypted = Kumogata::Crypt.encrypt("my_password", "jugem jugem" * 1024 * len) decrypted = Kumogata::Crypt.decrypt("my_password", encrypted) expect(decrypted).to eq("jugem jugem" * 1024 * len) end it 'make password' do passwd = Kumogata::Crypt.mkpasswd(16) expect(passwd).to be_kind_of(String) expect(passwd.length).to eq(16) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kumogata-0.5.12 | spec/kumogata_crypt_spec.rb |
kumogata-0.5.11 | spec/kumogata_crypt_spec.rb |