class LazySecretKeyImpl implements LazySecretKey {

    @Override
    public SecretKey getOrCreate() throws Exception {
        synchronized (secretFile) {
            if (secretKey == null) {
                if (secretFile.exists()) {
                    secretKey = loadKey(secretFile);
                } else {
                    secretKey = Encryption.generateNewKey();
                    Files.write(secretKey.getEncoded(), secretFile);
                }
            }
            return secretKey;
        }
    }

      LazySecretKeyImpl(File secretFile);

}