JavaScript (ES6), 5246 bytes
Saved 6 bytes thanks to @Neil
Expects (D)(c), where D is a string of digits and c is an integer.
D=>c=>eval(`for(k=0;;/[^${D}]/.test(kc)|k%256-c;;)++k`c+=256;c`)
JavaScript (ES6), 52 bytes
Expects (D)(c), where D is a string of digits and c is an integer.
D=>c=>eval(`for(k=0;/[^${D}]/.test(k)|k%256-c;)++k`)
JavaScript (ES6), 46 bytes
Saved 6 bytes thanks to @Neil
Expects (D)(c), where D is a string of digits and c is an integer.
D=>c=>eval(`for(;/[^${D}]/.test(c);)c+=256;c`)
JavaScript (ES6), 5852 bytes
Expects (D)(c), where D is a string of digits and c is an integer.
D=>c=>eval("for`for(k=0;(k+D).match(`[^$/[^${D}]`]/.test(k)||k%256|k%256-c;)++k"++k`)
JavaScript (ES6), 58 bytes
Expects (D)(c), where D is a string of digits and c is an integer.
D=>c=>eval("for(k=0;(k+D).match(`[^${D}]`)||k%256-c;)++k")
JavaScript (ES6), 52 bytes
Expects (D)(c), where D is a string of digits and c is an integer.
D=>c=>eval(`for(k=0;/[^${D}]/.test(k)|k%256-c;)++k`)
JavaScript (ES6), 5958 bytes
Expects (D)(c), where D is a string of digits and c is an integer.
D=>c=>eval("for(k=0;(++k+Dk+D).match(`[^${D}]`)||k%256-c;);k"++k")
JavaScript (ES6), 59 bytes
Expects (D)(c), where D is a string of digits and c is an integer.
D=>c=>eval("for(k=0;(++k+D).match(`[^${D}]`)||k%256-c;);k")
JavaScript (ES6), 58 bytes
Expects (D)(c), where D is a string of digits and c is an integer.
D=>c=>eval("for(k=0;(k+D).match(`[^${D}]`)||k%256-c;)++k")