code: @Override
      protected void store(ConfidentialKey key, byte[] payload) throws IOException {
          try {
              Cipher sym = Secret.getCipher("AES");
              sym.init(Cipher.ENCRYPT_MODE, masterKey);
              try (OutputStream fos = Files.newOutputStream(getFileFor(key).toPath());
                   CipherOutputStream cos = new CipherOutputStream(fos, sym)) {
                  cos.write(payload);
                  cos.write(MAGIC);
              }
          } catch (GeneralSecurityException e) {
              throw new IOException("Failed to persist the key: "+key.getId(),e);
          } catch (InvalidPathException e) {
              throw new IOException(e);
          }
      }
docs: Persists the payload of {@link ConfidentialKey} to the disk.