• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cossacklabs / themis / #7626
88%
master: 83%

Build:
Build:
LAST BUILD BRANCH: release/0.15.0
DEFAULT BRANCH: master
Ran 12 May 2020 10:57AM UTC
Jobs 1
Files 73
Run time 9s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 May 2020 10:36AM UTC coverage: 87.707%. Remained the same
#7626

push

travis-ci

web-flow
Secure Cell passphrase API: JavaThemis (#635)

* Passphrase support in JNI library

Add a new mode -- MODE_SEAL_PASSPHRASE -- to support Seal encryption
mode secured by passphrase. We do not introduce new API to JNI library
to keep ABI compatibility. Since the cost of doing JNI call is already
that high, it does not win us anything to use static mode-setting. It
makes sense to refactor Java API, but changing this JNI API does not
affect the users so it will be mostly a waste.

Note that Java constant is package-private. We don't want users to use
it with the old API because it will be extremely confusing. The old API
will accept strings, but it will encode them in UTF-16 by default which
is not what the new passphrase API does. Therefore we keep the constant
private. The old constants are getting deprecated too later.

* Passphrase API implementation

Add a new package-private class SecureCellSealWithPassphrase which
implements SecureCell.Seal interface, but with passphrases instead
of symmetric keys.

The new class can be instantiated with SecureCell#SealWithPassphrase
methods that accept a variety of inputs. Normally the String interface
should be used to get compatible behavior. Other interfaces can be used
if you need some non-UTF-8 encoding for the passphrase, or if you're
doing something weird.

We need to store the passphrase bytes somewhere. A new helper class --
PassphraseBytes -- is added for that. It extends KeyBytes to implement
IKey interface and holds the sensitive data for us. It also hosts the
encodinng conversion routine. We cannot use the standard String#getBytes
because it replaces unknow characters with ?, leading to unexpected and
not really portable behavior.

* Passphrase API tests

Once again, for the most part this is rewrite of Swift test suite into
Java. However, it has been augmented with some Java-specific tests to
verify that we handle the old 'passphrase-like' API in a sane way.

3767 of 4295 relevant lines covered (87.71%)

19344.49 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #7626.1 12 May 2020 10:57AM UTC 0
87.71
Source Files on build #7626
Detailed source file information is not available for this build.
  • Back to Repo
  • 74995500 on github
  • Prev Build on HEAD
  • Next Build on HEAD
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc