Stax, 15 bytes
┐°!'àÉgYg8∟╗`╖ë This 15 byte submission is packed into a variant of the CP437 character set. The corresponding ascii representation takes 18 bytes:
EVlVd+26/s@:fs{[Io Pretty sure it can be further trimmed down though.
E Put the two inputs on main stack Vl "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" Vd "0123456789" + Concatenate 26/ Partition to blocks of size 26 (array `a`) s@ Index array `a` with the input index array :fs Flatten to get a string `s` {[Io Order the input string Using the char array `s` as the key Implicit output VlVd+ can also be VLA|(, which left rotates the 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ by ten elemenets. The whole code can also be VlVd+26/,e@:f,{[Io, which reads the input stack twice instead of reading them all at the beginning to the main stack, and uses a different (more traditional) input format, as shown in this.