PHP 클래스 Airship\Cabin\Bridge\Blueprint\ChannelUpdates

Manage key updates from a particular channel
상속: extends BlueprintGear
파일 보기 프로젝트 열기: paragonie/airship 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Database $db, string $channel = '' ) ChannelUpdates constructor.
verifyUpdate ( SignatureSecretKey $sk, string $challenge ) : array Return an encoded message containing the updates, and an encoded Ed25519 signature of the message.

보호된 메소드들

메소드 설명
getChannelURLs ( boolean $doNotShuffle = false ) : array Get all URLs
getChannelUpdates ( string $root ) : array Send the HTTP request, return the
getKeyUpdates ( MerkleTree $tree ) : array Get key updates from the channel
getMerkleTree ( ) : MerkleTree Get the current Merkle tree for our active channel.
getUpdatedMerkleTree ( ) : MerkleTree Get the Merkle tree with key updates factored in.
insertKey ( array $keyData, array $nodeData ) : boolean We are creating a new key
notifyPeersOfNewUpdate ( ) This propagates the new update through the network.
parseChannelUpdateResponse ( array $data, DateTime $originated ) : array Parse the HTTP response and get the useful information out of it.
revokeKey ( array $keyData, array $nodeData ) : boolean We are removing a key from our trust store.
storeUpdate ( array $nodeData ) : boolean Store the new update in the database.
updatePackageQueue ( array $pkgData, integer $treeUpdateID ) : boolean We're storing metadata about a package in the database.
verifyMasterSignature ( array $supplierData, array $keyData, array $nodeData ) : boolean Verify that this key update was signed by the master key for this supplier.

메소드 상세

__construct() 공개 메소드

ChannelUpdates constructor.
public __construct ( Database $db, string $channel = '' )
$db Database
$channel string

getChannelURLs() 보호된 메소드

Get all URLs
protected getChannelURLs ( boolean $doNotShuffle = false ) : array
$doNotShuffle boolean
리턴 array

getChannelUpdates() 보호된 메소드

Send the HTTP request, return the
protected getChannelUpdates ( string $root ) : array
$root string
리턴 array

getKeyUpdates() 보호된 메소드

Get key updates from the channel
protected getKeyUpdates ( MerkleTree $tree ) : array
$tree MerkleTree
리턴 array

getMerkleTree() 보호된 메소드

Get the current Merkle tree for our active channel.
protected getMerkleTree ( ) : MerkleTree
리턴 MerkleTree

getUpdatedMerkleTree() 보호된 메소드

Get the Merkle tree with key updates factored in.
protected getUpdatedMerkleTree ( ) : MerkleTree
리턴 MerkleTree

insertKey() 보호된 메소드

We are creating a new key
protected insertKey ( array $keyData, array $nodeData ) : boolean
$keyData array
$nodeData array
리턴 boolean

notifyPeersOfNewUpdate() 보호된 메소드

This propagates the new update through the network.
protected notifyPeersOfNewUpdate ( )

parseChannelUpdateResponse() 보호된 메소드

Parse the HTTP response and get the useful information out of it.
protected parseChannelUpdateResponse ( array $data, DateTime $originated ) : array
$data array
$originated DateTime
리턴 array

revokeKey() 보호된 메소드

We are removing a key from our trust store.
protected revokeKey ( array $keyData, array $nodeData ) : boolean
$keyData array
$nodeData array
리턴 boolean

storeUpdate() 보호된 메소드

Store the new update in the database.
protected storeUpdate ( array $nodeData ) : boolean
$nodeData array
리턴 boolean

updatePackageQueue() 보호된 메소드

We're storing metadata about a package in the database.
protected updatePackageQueue ( array $pkgData, integer $treeUpdateID ) : boolean
$pkgData array
$treeUpdateID integer
리턴 boolean

verifyMasterSignature() 보호된 메소드

Verify that this key update was signed by the master key for this supplier.
protected verifyMasterSignature ( array $supplierData, array $keyData, array $nodeData ) : boolean
$supplierData array
$keyData array
$nodeData array
리턴 boolean

verifyUpdate() 공개 메소드

Return an encoded message containing the updates, and an encoded Ed25519 signature of the message.
public verifyUpdate ( SignatureSecretKey $sk, string $challenge ) : array
$sk SignatureSecretKey
$challenge string
리턴 array