class PasswordBasedKeyProxy extends LunaKeyProxy implements KeyProxy {

  @Override
  public boolean matchesCanary(final EncryptionKeyCanary canary) {
    if (canary.getSalt() == null || canary.getSalt().length == 0) {
      return false;
    }

    final Key key = deriveKey(unmodifiableList(asList(ArrayUtils.toObject(canary.getSalt()))));

    final boolean result = super.matchesCanary(key, canary);
    if (result) {
      setKey(key);
    }
    return result;
  }

  public  PasswordBasedKeyProxy(final String password, final int numIterations, final InternalEncryptionService encryptionService);

}