default ByteBuf decrypt(ByteBuf toDecrypt, T key) throws GeneralSecurityException {
    return Utils.applyByteBufferFunctionToByteBuf(toDecrypt, buffer -> decrypt(buffer, key));
  }
Decrypts the {@code toDecrypt} with the given key. The {@code toDecrypt} is a netty {@link ByteBuf}. This is used
for decrypting data chunks.
@param toDecrypt {@link ByteBuf} that needs to be decrypted
@param key the secret key (of type T) to use to decrypt
@return the {@link ByteBuffer} containing the decrypted content
@throws {@link GeneralSecurityException} on any exception with decryption
ambry-api/src/main/java/com/github/ambry/router/CryptoService.java