org.signal.zkgroup.profiles.ProfileKeyVersion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zkgroup-java Show documentation
Show all versions of zkgroup-java Show documentation
Zero Knowledge Groups library
//
// 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();
}
}
}