Added a TODO to follow Crypto-conditions spec

This commit is contained in:
Andrius Dagys 2016-11-30 17:07:39 +00:00
parent acaeca5814
commit ea04ebe311

View File

@ -31,7 +31,13 @@ sealed class CompositeKey {
/** Checks whether any of the given [keys] matches a leaf on the tree */
fun containsAny(otherKeys: Iterable<PublicKey>) = keys.intersect(otherKeys).isNotEmpty()
// TODO: implement a proper encoding/decoding mechanism
/**
* This is generated by serializing the composite key with Kryo, and encoding the resulting bytes in base58.
* A custom serialization format is being used.
*
* TODO: follow the crypto-conditions ASN.1 spec, some changes are needed to be compatible with the condition
* structure, e.g. mapping a PublicKey to a condition with the specific feature (ED25519).
*/
fun toBase58String(): String = Base58.encode(this.serialize().bytes)
companion object {