Search in sources :

Example 1 with VariantDictionary

use of com.keepassdroid.collections.VariantDictionary in project KeePassDX by Kunzisoft.

the class KdfParameters method deserialize.

public static KdfParameters deserialize(byte[] data) throws IOException {
    ByteArrayInputStream bis = new ByteArrayInputStream(data);
    LEDataInputStream lis = new LEDataInputStream(bis);
    VariantDictionary d = VariantDictionary.deserialize(lis);
    if (d == null) {
        assert (false);
        return null;
    }
    UUID uuid = Types.bytestoUUID(d.getByteArray(ParamUUID));
    if (uuid == null) {
        assert (false);
        return null;
    }
    KdfParameters kdfP = new KdfParameters(uuid);
    kdfP.copyTo(d);
    return kdfP;
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) LEDataInputStream(com.keepassdroid.stream.LEDataInputStream) UUID(java.util.UUID) VariantDictionary(com.keepassdroid.collections.VariantDictionary)

Aggregations

VariantDictionary (com.keepassdroid.collections.VariantDictionary)1 LEDataInputStream (com.keepassdroid.stream.LEDataInputStream)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 UUID (java.util.UUID)1