Q42 / Qlassified-Android

An Android Wrapper Library for easy Keystore Encryption
MIT License
47 stars 13 forks source link

Exception is risen when calling decryptEntry #1

Closed prophecy closed 8 years ago

prophecy commented 8 years ago

This because, you decrypt an unencrypted key.

I can fixed it by:

        final String key = entry.getKey();

        switch (QlassifiedEntry.Type.valueOf(decryptedType)) {
            case BOOLEAN: return new QlassifiedBoolean(key, Boolean.valueOf(decryptedValue));
            case FLOAT: return new QlassifiedFloat(key, Float.valueOf(decryptedValue));
            case INTEGER: return new QlassifiedInteger(key, Integer.valueOf(decryptedValue));
            case LONG: return new QlassifiedLong(key, Long.valueOf(decryptedValue));
            default: return new QlassifiedString(key, decryptedValue);
        }

Please consider

ShaPOC commented 8 years ago

Thanks for this fix, it's applied in the upcoming merge! https://github.com/Q42/Qlassified-Android/pull/6

prophecy commented 8 years ago

Welcome I think your library is significant! I would like to contribute your project if you don't mind.