All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.signal.zkgroup.profiles.ProfileKeyVersion Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
//
// Copyright (C) 2020 Signal Messenger, LLC.
// All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-only
//

// Generated by zkgroup/codegen/codegen.py - do not edit

package org.signal.zkgroup.profiles;

import org.signal.zkgroup.InvalidInputException;
import org.signal.zkgroup.internal.ByteArray;
import java.io.UnsupportedEncodingException;

public final class ProfileKeyVersion extends ByteArray {

  public static final int SIZE = 64;

  public ProfileKeyVersion(byte[] contents) throws InvalidInputException {
    super(contents, SIZE);
  }

  public ProfileKeyVersion(String contents) throws InvalidInputException, UnsupportedEncodingException {
    super(contents.getBytes("UTF-8"), SIZE);
  }

  public String serialize() {
    try {
      return new String(contents, "UTF-8");
    } catch (UnsupportedEncodingException e) {
      throw new AssertionError();
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy