Skip to content

Latest commit

 

History

History
114 lines (94 loc) · 2.51 KB

README.md

File metadata and controls

114 lines (94 loc) · 2.51 KB
classDiagram
  class ISessionless {
    +vault: IVault

    +generateUUID(): String
    +sign(message: String, key: PrivateKey): IMessageSignature
    +verify(signedMessage: SignedMessage): Boolean
    +associate(...signedMessages: SignedMessage): Boolean
  }

  class IWithKeyStore {
    @Override
    ^vault: IKeyStoreVault

    +generateKeys(access: KeyAccessInfo): KeyPair
    +generateKeysAsync(access: KeyAccessInfo): KeyPair
    +getKeys(): KeyPair
    +sign(message: String, access: KeyAccess): IMessageSignature
  }

  class IWithCustomVault {
    @Override
    ^vault: ICustomVault

    +generateKeys(): KeyPairHex
    +generateKeysAsync(): KeyPairHex
    +getKeys(): KeyPairHex
    +sign(message: String): IMessageSignature
  }

  ISessionless <-- IWithKeyStore
  ISessionless <-- IWithCustomVault
Loading
classDiagram
  class IVault {
    +getDefault(keyStore: KeyStore): KeyStoreVault
  }
  class IKeyStoreVault {
    +keyStore: KeyStore

    +save(pair: KeyPair, access: KeyAccessInfo, certificate: Certificate)
    +get(access: KeyAccessInfo): KeyPair
  }
  class ICustomVault {
    +save(pair: KeyPairHex)
    +get(): KeyPairHex?
  }

  class KeyStoreVault {
    +save(pair: KeyPair, access: KeyAccessInfo)
    +constructor(keyStore: KeyStore)
  }

  IVault <-- IKeyStoreVault
  IVault <-- ICustomVault
  IKeyStoreVault <-- KeyStoreVault
Loading

The rest:

classDiagram
  class IMessageSignature { }
  class MessageSignatureInt {
    +r: BigInteger
    +s: BigInteger
    +constructor(r: BigInteger, s: BigInteger)
    +constructor(ints: Array<BigInteger>)
    +toHex(): MessageSignatureHex
  }
  class MessageSignatureHex {
    +rHex: String
    +sHex: String
    +constructor(rHex: String, sHex: String)
    +toInt(): MessageSignatureInt
  }

  IMessageSignature <-- MessageSignatureInt
  IMessageSignature <-- MessageSignatureHex
Loading

More...

classDiagram
  class SignedMessage {
    +message: String
    +signature: MessageSignatureHex
    +publicKey: String
    +constructor(..all..)
  }

  class KeyPairHex {
    +privateKey: String
    +publicKey: String
    +constructor(..all..)
  }

  class KeyAccessInfo {
    +alias: String
    +password: CharArray?
    +constructor(..all..)
    +constructor(alias: String, password: String)
  }
Loading