[client] Proper TMP renamed and commented 'SynchronisationKey()'
This commit is contained in:
parent
e822440581
commit
e178642fea
|
@ -140,14 +140,21 @@ func (c *T) Receive(r io.Reader) error {
|
|||
|
||||
|
||||
|
||||
/* (5) TMP
|
||||
/* (5) Returns a synchronisation key (first server connection)
|
||||
*
|
||||
* @return key<[]byte> Synchronisation key
|
||||
* @return err<error>
|
||||
*
|
||||
---------------------------------------------------------*/
|
||||
func (c *T) TMP() []byte {
|
||||
hash, err := c.key.CurrentHash()
|
||||
if err != nil { panic(err) }
|
||||
func (c *T) SynchronisationKey() ([]byte, error) {
|
||||
|
||||
/* (1) Get current hash */
|
||||
hash, err := c.key.CurrentHash()
|
||||
if err != nil { return nil, err }
|
||||
|
||||
/* (2) Decrement key so 'hash' is valid */
|
||||
c.key.Decrement()
|
||||
|
||||
return hash;
|
||||
/* (3) Return key */
|
||||
return hash, nil;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue