@Test public void testFromMultiSignaturePublicKey() { MultiSignaturePublicKey multisigPubKey = MultiSignaturePublicKey .create(Arrays.asList(PublicKey.fromHexString(JAVA_PUB_KEY), PublicKey.fromHexString(JAVA_PUB_KEY2)), 2); assertThat(AuthenticationKey.fromMultiSignaturePublicKey(multisigPubKey).toString(), is("5c4a01f38b5191171f838370e4675925eec2d9d8a4aad2c9d81257612371a680")); }
public static AuthenticationKey fromMultiSignaturePublicKey(MultiSignaturePublicKey publicKey) { byte[] pkBytes = publicKey.toArray(); byte[] pkBytesWithSignatureSchemeId = new byte[pkBytes.length + 1]; System.arraycopy(pkBytes, 0, pkBytesWithSignatureSchemeId, 0, pkBytes.length); pkBytesWithSignatureSchemeId[pkBytes.length] = SIGNATURE_SCHEME_MULTI_ED25519; return new AuthenticationKey(Hash.ofInput(ByteArray.from(pkBytesWithSignatureSchemeId)).hash()); }
AuthenticationKey implements ByteSequence { public static AuthenticationKey fromMultiSignaturePublicKey(MultiSignaturePublicKey publicKey) { byte[] pkBytes = publicKey.toArray(); byte[] pkBytesWithSignatureSchemeId = new byte[pkBytes.length + 1]; System.arraycopy(pkBytes, 0, pkBytesWithSignatureSchemeId, 0, pkBytes.length); pkBytesWithSignatureSchemeId[pkBytes.length] = SIGNATURE_SCHEME_MULTI_ED25519; return new AuthenticationKey(Hash.ofInput(ByteArray.from(pkBytesWithSignatureSchemeId)).hash()); } }
AuthenticationKey implements ByteSequence { public static AuthenticationKey fromMultiSignaturePublicKey(MultiSignaturePublicKey publicKey) { byte[] pkBytes = publicKey.toArray(); byte[] pkBytesWithSignatureSchemeId = new byte[pkBytes.length + 1]; System.arraycopy(pkBytes, 0, pkBytesWithSignatureSchemeId, 0, pkBytes.length); pkBytesWithSignatureSchemeId[pkBytes.length] = SIGNATURE_SCHEME_MULTI_ED25519; return new AuthenticationKey(Hash.ofInput(ByteArray.from(pkBytesWithSignatureSchemeId)).hash()); } private  AuthenticationKey(ByteArray bytes); }
AuthenticationKey implements ByteSequence { public static AuthenticationKey fromMultiSignaturePublicKey(MultiSignaturePublicKey publicKey) { byte[] pkBytes = publicKey.toArray(); byte[] pkBytesWithSignatureSchemeId = new byte[pkBytes.length + 1]; System.arraycopy(pkBytes, 0, pkBytesWithSignatureSchemeId, 0, pkBytes.length); pkBytesWithSignatureSchemeId[pkBytes.length] = SIGNATURE_SCHEME_MULTI_ED25519; return new AuthenticationKey(Hash.ofInput(ByteArray.from(pkBytesWithSignatureSchemeId)).hash()); } private  AuthenticationKey(ByteArray bytes); static AuthenticationKey fromPublicKey(PublicKey publicKey); static AuthenticationKey fromMultiSignaturePublicKey(MultiSignaturePublicKey publicKey); static AuthenticationKey fromPublicKey(java.security.PublicKey javaPublicKey); static AuthenticationKey fromByteArray(ByteArray bytes); static AuthenticationKey fromHexString(String hexString); ByteArray toByteArray(); ByteArray prefix(); @Override byte[] toArray(); @Override String toString(); }
AuthenticationKey implements ByteSequence { public static AuthenticationKey fromMultiSignaturePublicKey(MultiSignaturePublicKey publicKey) { byte[] pkBytes = publicKey.toArray(); byte[] pkBytesWithSignatureSchemeId = new byte[pkBytes.length + 1]; System.arraycopy(pkBytes, 0, pkBytesWithSignatureSchemeId, 0, pkBytes.length); pkBytesWithSignatureSchemeId[pkBytes.length] = SIGNATURE_SCHEME_MULTI_ED25519; return new AuthenticationKey(Hash.ofInput(ByteArray.from(pkBytesWithSignatureSchemeId)).hash()); } private  AuthenticationKey(ByteArray bytes); static AuthenticationKey fromPublicKey(PublicKey publicKey); static AuthenticationKey fromMultiSignaturePublicKey(MultiSignaturePublicKey publicKey); static AuthenticationKey fromPublicKey(java.security.PublicKey javaPublicKey); static AuthenticationKey fromByteArray(ByteArray bytes); static AuthenticationKey fromHexString(String hexString); ByteArray toByteArray(); ByteArray prefix(); @Override byte[] toArray(); @Override String toString();  }