private boolean verify ( String key , BoxSignatureAlgorithm actualAlgorithm , String actualSignature , String webHookPayload , String deliveryTimestamp ) { if ( actualSignature == null ) { return false ; } byte [ ] actual = Base64 . decode ( actualSignature ) ; byte [ ] expected = this . signRaw ( actualAlgorithm , key , webHookPayload , deliveryTimestamp ) ; return Arrays . equals ( expected , actual ) ; }
Verifies a provided signature .